[Bf-blender-cvs] [10c93a5] master: Check for no-op edge separates to quiet asserts when inset individual.
Howard Trickey
noreply at git.blender.org
Thu Sep 3 16:44:21 CEST 2015
Commit: 10c93a582b7330bff8a6a6caafe57acfd3a4a015
Author: Howard Trickey
Date: Thu Sep 3 10:37:42 2015 -0400
Branches: master
https://developer.blender.org/rB10c93a582b7330bff8a6a6caafe57acfd3a4a015
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.)
===================================================================
M source/blender/bmesh/intern/bmesh_core.c
===================================================================
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index 5bb418a..b8f7b3f 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
More information about the Bf-blender-cvs
mailing list