Fix #118962: Skip setting not taken into account looping over points
The GPv3 envelope modifier was computing the correct number of strokes to generate, but then not actually skipping over points. Result is that all envelope strokes got added at the beginning instead of the whole point range. Pull Request: https://projects.blender.org/blender/blender/pulls/119023
This commit is contained in:
@@ -482,16 +482,17 @@ static void create_envelope_strokes_for_curve(const EnvelopeInfo &info,
|
||||
* Each span only gets added once since it repeats for neighboring points.
|
||||
*/
|
||||
|
||||
for (const int i : IndexRange(num_strokes)) {
|
||||
const IndexRange dst_envelope_points = {i * info.points_per_curve, info.points_per_curve};
|
||||
for (const int dst_i : IndexRange(num_strokes)) {
|
||||
const int src_i = dst_i * (1 + info.skip);
|
||||
const IndexRange dst_envelope_points = {dst_i * info.points_per_curve, info.points_per_curve};
|
||||
|
||||
curve_offsets[i] = dst_points[dst_envelope_points.start()];
|
||||
material_indices[i] = info.material_index >= 0 ? info.material_index :
|
||||
curve_offsets[dst_i] = dst_points[dst_envelope_points.start()];
|
||||
material_indices[dst_i] = info.material_index >= 0 ? info.material_index :
|
||||
src_material_indices[src_curve_index];
|
||||
|
||||
create_envelope_stroke_for_point(src_curve_points,
|
||||
src_curve_cyclic,
|
||||
i,
|
||||
src_i,
|
||||
spread,
|
||||
base_length,
|
||||
point_src_indices.slice(dst_envelope_points));
|
||||
|
||||
Reference in New Issue
Block a user