Fix #130376: GPv3: Outline modifier traces flat caps incorrectly

For flat caps, only one point is added in data.positions array for
endpoints of stroke. It results in incomplete outline. To resolve
this, add another point in new curves at the exact opposite position.

Pull Request: https://projects.blender.org/blender/blender/pulls/130437
This commit is contained in:
Pratik Borhade
2024-11-18 16:16:08 +01:00
committed by Thomas Dinges
parent 28a5a800ee
commit e23b710bcf

View File

@@ -503,6 +503,8 @@ static void generate_cap(const float3 &point,
r_src_indices);
break;
case GP_STROKE_CAP_FLAT:
r_perimeter.append(point - normal * radius);
r_src_indices.append(src_point_index);
r_perimeter.append(point + normal * radius);
r_src_indices.append(src_point_index);
break;