32 .evaluated_geometry_field();
48 if (
mesh ==
nullptr) {
90 params.
set_output(
"Curve"_ustr, std::move(geometry_set));
100 "Convert mesh edges to curve segments. Attributes are propagated to curve points."},
105 "Convert each mesh face to a cyclic curve. Face attributes are propagated to curves."},
106 {0,
nullptr, 0,
nullptr,
nullptr},
118 ntype.
ui_name =
"Mesh to Curve";
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_TO_CURVE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_as_mask(int field_index)
NodeAttributeFilter get_attribute_filter(const UString output_identifier) const
T extract_input(const UString identifier)
T get_input(const UString identifier) const
const bNode & node() const
void set_output(const UString identifier, T &&value)
void node_register_type(bNodeType &ntype)
Curves * curves_new_nomain(int points_num, int curves_num)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
bke::CurvesGeometry mesh_edges_to_curves_convert(const Mesh &mesh, const IndexMask &selection, const bke::AttributeFilter &attribute_filter)
bke::CurvesGeometry mesh_faces_to_curves_convert(const Mesh &mesh, const IndexMask &selection, const bke::AttributeFilter &attribute_filter)
static void node_register()
static void node_rna(StructRNA *srna)
static void node_geo_exec(GeoNodeExecParams params)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_declare(NodeDeclarationBuilder &b)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
void keep_only(Span< GeometryComponent::Type > component_types)
void replace_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const Mesh * get_mesh() const
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)