[Bf-blender-cvs] [a376073f1eb] temp-geometry-nodes-fields-prototype: Fix curve length node (output a field, otherwise it crashes)
Hans Goudey
noreply at git.blender.org
Tue Aug 10 18:57:55 CEST 2021
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
More information about the Bf-blender-cvs
mailing list