diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-08 18:06:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-08 18:06:45 +0300 |
commit | 9ac83d499e9188b382126054e9a66c74e8aa644a (patch) | |
tree | 62fa6df25b3b5561d73300ef0ad71c5efa744b16 /source/blender/bmesh/tools | |
parent | e830334357d1f73afbeeeb421ffcbed8e99b2fab (diff) |
Fix bisect flagging w/ multiple cuts on an ngon
Caused symmetrize to fail for concave ngons crossing the midpoint multiple times.
Diffstat (limited to 'source/blender/bmesh/tools')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bisect_plane.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bisect_plane.c b/source/blender/bmesh/tools/bmesh_bisect_plane.c index fbcf573acd9..9fb6d39a008 100644 --- a/source/blender/bmesh/tools/bmesh_bisect_plane.c +++ b/source/blender/bmesh/tools/bmesh_bisect_plane.c @@ -264,8 +264,18 @@ static void bm_face_bisect_verts(BMesh *bm, BMFace *f, const float plane[4], con /* in fact this simple test is good enough, * test if the loops are adjacent */ if (found && !BM_loop_is_adjacent(l_a, l_b)) { + BMLoop *l_new; BMFace *f_tmp; - f_tmp = BM_face_split(bm, face_split_arr[j], l_a, l_b, NULL, NULL, true); + f_tmp = BM_face_split(bm, face_split_arr[j], l_a, l_b, &l_new, NULL, true); + + if (l_new) { + if (oflag_center) { + BMO_elem_flag_enable(bm, l_new->e, oflag_center); + BMO_elem_flag_enable(bm, l_new->f, oflag_center); + BMO_elem_flag_enable(bm, face_split_arr[j], oflag_center); + } + } + if (f_tmp) { if (f_tmp != face_split_arr[j]) { STACK_PUSH(face_split_arr, f_tmp); |