Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
| Show All 16 Lines | |||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| #include "BKE_spline.hh" | #include "BKE_spline.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_input_spline_length_declare(NodeDeclarationBuilder &b) | static void geo_node_input_spline_length_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_output<decl::Float>("Length").field_source(); | b.add_output<decl::Float>(N_("Length")).field_source(); | ||||
| } | } | ||||
| static const GVArray *construct_spline_length_gvarray(const CurveComponent &component, | static const GVArray *construct_spline_length_gvarray(const CurveComponent &component, | ||||
| const AttributeDomain domain, | const AttributeDomain domain, | ||||
| ResourceScope &scope) | ResourceScope &scope) | ||||
| { | { | ||||
| const CurveEval *curve = component.get_for_read(); | const CurveEval *curve = component.get_for_read(); | ||||
| if (curve == nullptr) { | if (curve == nullptr) { | ||||
| ▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines | |||||