diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-26 06:26:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-26 07:34:55 +0300 |
commit | 77c3ecf88c3109e5a6b14f6e064fe1a88644bab6 (patch) | |
tree | 514245740b9f823f1d8b0c5d0cac25b1f8c92cb6 /source/blender/bmesh/intern/bmesh_core.c | |
parent | dd070c6c32e75b7cc45042e3c707110adcfd6cc4 (diff) |
BMesh: check at least 2 edges in each loops vert
Also no need to check twice
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_core.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index 29178c29162..b166d60ce8f 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -683,7 +683,7 @@ int bmesh_elem_check(void *element, const char htype) err |= IS_FACE_LOOP_WRONG_RADIAL_LENGTH; } - if (!bmesh_disk_count(l_iter->v) || !bmesh_disk_count(l_iter->next->v)) { + if (bmesh_disk_count_ex(l_iter->v, 2) < 2) { err |= IS_FACE_LOOP_WRONG_DISK_LENGTH; } } @@ -937,9 +937,6 @@ void BM_face_kill_loose(BMesh *bm, BMFace *f) void BM_edge_kill(BMesh *bm, BMEdge *e) { - bmesh_disk_edge_remove(e, e->v1); - bmesh_disk_edge_remove(e, e->v2); - if (e->l) { BMLoop *l = e->l, *lnext, *startl = e->l; @@ -957,6 +954,9 @@ void BM_edge_kill(BMesh *bm, BMEdge *e) l = lnext; } while (l != startl); } + + bmesh_disk_edge_remove(e, e->v1); + bmesh_disk_edge_remove(e, e->v2); bm_kill_only_edge(bm, e); } |