17 b.use_custom_socket_order();
18 b.allow_any_socket_order();
21 .description(
"Curves to subdivide");
22 b.add_output<
decl::Geometry>(
"Curve"_ustr).propagate_all_geometry().align_with_previous();
27 .evaluated_geometry_field()
28 .
description(
"The number of control points to create on the segment following each point");
39 evaluator.
add(cuts_field);
48 src_curves, src_curves.
curves_range(), cuts, attribute_filter);
60 for (
const int layer_index :
grease_pencil.layers().index_range()) {
63 if (drawing ==
nullptr) {
72 evaluator.
add(cuts_field);
81 src_curves, src_curves.
curves_range(), cuts, attribute_filter);
109 params.
set_output(
"Curve"_ustr, geometry_set);
116 ntype.
ui_name =
"Subdivide Curve";
117 ntype.
ui_description =
"Dividing each curve segment into a specified number of pieces";
Low-level operations for curves.
Low-level operations for grease pencil.
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_SUBDIVIDE_CURVE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
T get_internal_single() const
IndexRange curves_range() const
bke::CurvesGeometry & strokes_for_write()
const bke::CurvesGeometry & strokes() const
void tag_topology_changed()
int add(GField field, GVArray *varray_ptr)
const GVArray & get_evaluated(const int field_index) const
NodeAttributeFilter get_attribute_filter(const UString output_identifier) const
T extract_input(const UString identifier)
void set_output(const UString identifier, T &&value)
static void remember_deformed_positions_if_necessary(GeometrySet &geometry)
void curves_copy_parameters(const Curves &src, Curves &dst)
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 subdivide_curves(const bke::CurvesGeometry &src_curves, const IndexMask &selection, const VArray< int > &cuts, const bke::AttributeFilter &attribute_filter={})
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static void subdivide_grease_pencil_curves(GreasePencil &grease_pencil, Field< int > &cuts_field, const AttributeFilter &attribute_filter)
static Curves * subdivide_curves(const Curves &src_curves_id, Field< int > &cuts_field, const bke::AttributeFilter &attribute_filter)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
const Curves * get_curves() const
bool has_grease_pencil() const
void replace_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
GreasePencil * get_grease_pencil_for_write()
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare