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:
parent
30534deced
commit
74a5fb734a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue