[Bf-blender-cvs] [e4d342b5429] hair_guides_grooming: Fix face bounday bmesh operator.

Lukas Tönne noreply at git.blender.org
Sun Jun 3 12:15:42 CEST 2018


Commit: e4d342b5429728f7ec4b9237d7df712c3f954bd4
Author: Lukas Tönne
Date:   Sun Jun 3 10:57:20 2018 +0100
Branches: hair_guides_grooming
https://developer.blender.org/rBe4d342b5429728f7ec4b9237d7df712c3f954bd4

Fix face bounday bmesh operator.

The start loop search function could return loops outside of the tagged faces.
The loops should always be of tagged faces, even when the vertex is part of
a tagged face. Otherwise it can create extra boundary vertices around untagged faces.

===================================================================

M	source/blender/bmesh/operators/bmo_face_island.c

===================================================================

diff --git a/source/blender/bmesh/operators/bmo_face_island.c b/source/blender/bmesh/operators/bmo_face_island.c
index e52052a28d3..529159c9302 100644
--- a/source/blender/bmesh/operators/bmo_face_island.c
+++ b/source/blender/bmesh/operators/bmo_face_island.c
@@ -53,16 +53,17 @@ static BMLoop* bmo_face_island_find_start_loop(BMesh *bm, BMOperator *op)
 		BMIter l_iter;
 		BM_ITER_ELEM(l, &l_iter, f, BM_LOOPS_OF_FACE)
 		{
+			if (!BM_loop_is_manifold(l)) {
+				/* treat non-manifold edges as boundaries */
+				return l;
+			}
+			
 			BMLoop *lr = l;
 			do
 			{
-				if (!BM_loop_is_manifold(lr)) {
-					/* treat non-manifold edges as boundaries */
-					return lr;
-				}
 				if (!BMO_face_flag_test(bm, lr->f, FACE_MARK))
 				{
-					return lr;
+					return l;
 				}
 				lr = lr->radial_next;
 			}



More information about the Bf-blender-cvs mailing list