15 {GeometryComponent::Type::Curve, GeometryComponent::Type::GreasePencil});
24 float total_length = 0.0f;
43 for (
const int layer_index : grease_pencil.layers().index_range()) {
44 const Drawing *drawing = grease_pencil.get_eval_drawing(grease_pencil.layer(layer_index));
45 if (drawing ==
nullptr) {
53 params.set_default_remaining_outputs();
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)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
IndexRange curves_range() const
float evaluated_length_total_for_curve(int curve_index, bool cyclic) const
void ensure_evaluated_lengths() const
VArray< bool > cyclic() const
const bke::CurvesGeometry & strokes() const
local_group_size(16, 16) .push_constant(Type b
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(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
const GreasePencil * get_grease_pencil() const
const Curves * get_curves() const
bool has_grease_pencil() const
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare