Commit: a376073f1eb3a19e7ab6dc4ce911c07eda8de8d9
Author: Hans Goudey
Date:   Tue Aug 10 11:57:42 2021 -0500
Branches: temp-geometry-nodes-fields-prototype
https://developer.blender.org/rBa376073f1eb3a19e7ab6dc4ce911c07eda8de8d9

Fix curve length node (output a field, otherwise it crashes)

===================================================================

M       source/blender/nodes/geometry/nodes/node_geo_curve_length.cc

===================================================================

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 306085e3b75..56f2934de85 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc
@@ -42,7 +42,7 @@ static void geo_node_curve_length_exec(GeoNodeExecParams 
params)
   for (const SplinePtr &spline : curve.splines()) {
     length += spline->length();
   }
-  params.set_output("Length", length);
+  params.set_output("Length", bke::FieldRef<float>(new 
bke::ConstantField(length)));
 }
 
 }  // namespace blender::nodes

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to