24 b.add_input<
decl::Geometry>(
"Mesh").supported_type(GeometryComponent::Type::Mesh);
41 if (mesh ==
nullptr) {
83 params.
set_output(
"Curve", std::move(geometry_set));
93 "Convert mesh edges to curve segments. Attributes are propagated to curve points."},
98 "Convert each mesh face to a cyclic curve. Face attributes are propagated to curves."},
99 {0,
nullptr, 0,
nullptr,
nullptr},
111 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)
T extract_input(StringRef identifier)
void set_output(StringRef identifier, T &&value)
T get_input(StringRef identifier) const
const bNode & node() const
NodeAttributeFilter get_attribute_filter(const StringRef output_identifier) const
void node_register_type(bNodeType &ntype)
Curves * curves_new_nomain(int points_num, int curves_num)
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_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_rna(StructRNA *srna)
static void node_geo_exec(GeoNodeExecParams params)
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(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void keep_only_during_modify(Span< GeometryComponent::Type > component_types)
void replace_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const Mesh * get_mesh() const
void modify_geometry_sets(ForeachSubGeometryCallback callback)
void remove_geometry_during_modify()
std::string ui_description
void(*) draw_buttons(uiLayout *, bContext *C, PointerRNA *ptr)
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< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)