Fix #118962: skip setting not taken into account looping over points #119023

Merged
Falk David merged 1 commits from LukasTonne/blender:fix-gp3-envelope-modifier-skip into main 2024-03-04 10:57:27 +01:00
1 changed files with 6 additions and 5 deletions

View File

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