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:
authorIliya Katueshenock <Moder>2022-08-22 17:30:18 +0300
committerJacques Lucke <jacques@blender.org>2022-08-22 17:30:18 +0300
commit5fff6c419c54be9eb29a7fae33abd632d0362916 (patch)
tree92a439ea5352ea6970a00909836ce6d5d28e2a6c /source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
parent8265d08e7fde3c54f84b9515da515a1c31977fef (diff)
Fix T100258: wrong spline length used in Spline Parameter node
Differential Revision: https://developer.blender.org/D15705
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
index b98541e3446..5901d310df4 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
@@ -143,8 +143,8 @@ static VArray<float> construct_curve_parameter_varray(const bke::CurvesGeometry
Array<float> lengths = accumulated_lengths_curve_domain(curves);
const int last_index = curves.curves_num() - 1;
- const int total_length = lengths.last() + curves.evaluated_length_total_for_curve(
- last_index, cyclic[last_index]);
+ const float total_length = lengths.last() + curves.evaluated_length_total_for_curve(
+ last_index, cyclic[last_index]);
if (total_length > 0.0f) {
const float factor = 1.0f / total_length;
for (float &value : lengths) {