Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_length.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_length.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc
index 82621189964..d5769c691c8 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc
@@ -14,13 +14,13 @@ static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
{
GeometrySet curve_set = params.extract_input<GeometrySet>("Curve");
- if (!curve_set.has_curve()) {
+ if (!curve_set.has_curves()) {
params.set_default_remaining_outputs();
return;
}
- const CurveEval &curve = *curve_set.get_curve_for_read();
+ const std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curve_set.get_curves_for_read());
float length = 0.0f;
- for (const SplinePtr &spline : curve.splines()) {
+ for (const SplinePtr &spline : curve->splines()) {
length += spline->length();
}
params.set_output("Length", length);