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".
This commit is contained in:
Hans Goudey 2022-05-11 11:33:47 +02:00
parent 30534deced
commit 74a5fb734a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}