From 10c93a582b7330bff8a6a6caafe57acfd3a4a015 Mon Sep 17 00:00:00 2001 From: Howard Trickey Date: Thu, 3 Sep 2015 10:37:42 -0400 Subject: Check for no-op edge separates to quiet asserts when inset individual. This causes no change in behavior, since code was alreadying doing a no-op in bmesh_edge_separate if the edge is a boundary. But it tripped an assert, annoying in debug builds. We want to leave assert in bmesh_edge_separate in case callers expect there to be separate loops after this always. So putting test in caller. (Same worry about bmesh_urmv_loop? I checked callers and they appear OK to me - they deal with the no-op return.) --- source/blender/bmesh/intern/bmesh_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/bmesh/intern') diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index 5bb418a5102..b8f7b3f6b45 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -2395,6 +2395,8 @@ void bmesh_edge_separate( * Disconnects a face from its vertex fan at loop \a l_sep * * \return The newly created BMVert + * + * \note Will be a no-op and return original vertex if only two edges at that vertex. */ BMVert *bmesh_urmv_loop(BMesh *bm, BMLoop *l_sep) { @@ -2406,8 +2408,10 @@ BMVert *bmesh_urmv_loop(BMesh *bm, BMLoop *l_sep) /* peel the face from the edge radials on both sides of the * loop vert, disconnecting the face from its fan */ - bmesh_edge_separate(bm, l_sep->e, l_sep, false); - bmesh_edge_separate(bm, l_sep->prev->e, l_sep->prev, false); + if (!BM_edge_is_boundary(l_sep->e)) + bmesh_edge_separate(bm, l_sep->e, l_sep, false); + if (!BM_edge_is_boundary(l_sep->prev->e)) + bmesh_edge_separate(bm, l_sep->prev->e, l_sep->prev, false); /* do inline, below */ #if 0 -- cgit v1.2.3