diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-11 12:33:47 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-11 12:33:52 +0300 |
commit | 74a5fb734ab5ddfa1c4dfbc50e5daf2190ad40a1 (patch) | |
tree | 9f9fa9749d1a229abf83e5621fd563a639809333 /source/blender | |
parent | 30534deced8dad16c566dd82db3edd462283de13 (diff) |
Fix: Spline parameter node broken for Catmull Rom curves
Subtracting one from the evaluated index could make the index -1.
That was only necessary for Bezier curves due to the specifics of
the "bezier_evaluated_offsets".
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc | 2 |
1 files changed, 1 insertions, 1 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 a548becf24e..ae36248b573 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 @@ -75,7 +75,7 @@ static Array<float> curve_length_point_domain(const bke::CurvesGeometry &curves) case CURVE_TYPE_CATMULL_ROM: { const int resolution = resolutions[i_curve]; for (const int i : IndexRange(points.size()).drop_back(1)) { - lengths[i + 1] = evaluated_lengths[resolution * i - 1]; + lengths[i + 1] = evaluated_lengths[resolution * i]; } break; } |