[Bf-blender-cvs] [e8dfd10f749] temp-eevee-next-cryptomatte: Fix T100258: wrong spline length used in Spline Parameter node
Iliya Katueshenock
noreply at git.blender.org
Tue Aug 23 12:59:55 CEST 2022
Commit: e8dfd10f74968f9b13d0081e8c1da6fb11f75ba1
Author: Iliya Katueshenock
Date: Mon Aug 22 16:30:18 2022 +0200
Branches: temp-eevee-next-cryptomatte
https://developer.blender.org/rBe8dfd10f74968f9b13d0081e8c1da6fb11f75ba1
Fix T100258: wrong spline length used in Spline Parameter node
Differential Revision: https://developer.blender.org/D15705
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list