diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2015-09-03 17:37:42 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2015-09-03 17:42:16 +0300 |
commit | 10c93a582b7330bff8a6a6caafe57acfd3a4a015 (patch) | |
tree | a7965b463a5e5d79af5a5be6b90e0daf607bba39 /source | |
parent | b899114a7ed222ad41c86f2408200838dd6e33ba (diff) |
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.)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_core.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 |