From 5fff6c419c54be9eb29a7fae33abd632d0362916 Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Mon, 22 Aug 2022 16:30:18 +0200 Subject: Fix T100258: wrong spline length used in Spline Parameter node Differential Revision: https://developer.blender.org/D15705 --- .../blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') 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 construct_curve_parameter_varray(const bke::CurvesGeometry Array 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) { -- cgit v1.2.3