diff options
author | Hans Goudey <h.goudey@me.com> | 2021-11-01 21:13:44 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-11-01 21:13:44 +0300 |
commit | b6c2deef05cbaa015c74a0c5b1b0451686de49f6 (patch) | |
tree | 32a24c46484800c3dfe559444307bdca98689db1 /source/blender | |
parent | 6321dd3d400738d5015c53af593fd25b09e79209 (diff) |
Fix T92662: Curve to mesh start cap invalid topology
rBbe3e09ecec5372f switched the order for vertices referenced by the
start cap's corners, but it failed to account for the offset necessary
for edge indices, since the order changed.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/curve_to_mesh_convert.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc index cd40d5e8a41..ed4af2bbb08 100644 --- a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc +++ b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc @@ -202,7 +202,9 @@ static void spline_extrude_to_mesh_data(const ResultInfo &info, const int i_inv = info.profile_edge_len - i - 1; MLoop &loop_start = r_loops[cap_loop_offset + i]; loop_start.v = info.vert_offset + i_inv; - loop_start.e = profile_edges_start + i_inv; + loop_start.e = profile_edges_start + ((i == (info.profile_edge_len - 1)) ? + (info.profile_edge_len - 1) : + (i_inv - 1)); MLoop &loop_end = r_loops[cap_loop_offset + info.profile_edge_len + i]; loop_end.v = last_ring_vert_offset + i; loop_end.e = last_ring_edge_offset + i; |