16 .description(
"Curve to compute the length of");
23 curves.ensure_evaluated_lengths();
25 float total_length = 0.0f;
26 for (
const int i :
curves.curves_range()) {
27 total_length +=
curves.evaluated_length_total_for_curve(i, cyclic[i]);
44 for (
const int layer_index :
grease_pencil.layers().index_range()) {
46 if (drawing ==
nullptr) {
67 ntype.
ui_description =
"Retrieve the length of all splines added together";
Low-level operations for curves.
Low-level operations for grease pencil.
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_CURVE_LENGTH
#define NOD_REGISTER_NODE(REGISTER_FUNC)
const bke::CurvesGeometry & strokes() const
T extract_input(const UString identifier)
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
float length(VecOp< float, D >) RET
void node_register_type(bNodeType &ntype)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static float curves_total_length(const bke::CurvesGeometry &curves)
static void node_geo_exec(GeoNodeExecParams params)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
const GreasePencil * get_grease_pencil() const
const Curves * get_curves() const
bool has_grease_pencil() const
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare