[Bf-blender-cvs] [544b76a] master: BMesh: ignore non-manifold face connections

Campbell Barton noreply at git.blender.org
Wed May 11 21:56:50 CEST 2016


Commit: 544b76ac9cf79bcc64b9f8248984f1d408d32eb8
Author: Campbell Barton
Date:   Thu May 12 06:00:05 2016 +1000
Branches: master
https://developer.blender.org/rB544b76ac9cf79bcc64b9f8248984f1d408d32eb8

BMesh: ignore non-manifold face connections

Was showing an error message,
now dissolve the faces that and delimit at non-manifold boundaries.

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

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

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

diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index c8dff4a..52814a8 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -43,6 +43,7 @@
 #define FACE_MARK   1
 #define FACE_ORIG   2
 #define FACE_NEW    4
+#define FACE_TAG    8
 
 #define EDGE_MARK   1
 #define EDGE_TAG    2
@@ -156,19 +157,19 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
 		}
 	}
 
-	BMO_slot_buffer_flag_enable(bm, op->slots_in, "faces", BM_FACE, FACE_MARK);
+	BMO_slot_buffer_flag_enable(bm, op->slots_in, "faces", BM_FACE, FACE_MARK | FACE_TAG);
 	
 	/* collect region */
 	BMO_ITER (f, &oiter, op->slots_in, "faces", BM_FACE) {
 		BMFace *f_iter;
-		if (!BMO_elem_flag_test(bm, f, FACE_MARK)) {
+		if (!BMO_elem_flag_test(bm, f, FACE_TAG)) {
 			continue;
 		}
 
 		BLI_array_empty(faces);
 		faces = NULL; /* forces different allocatio */
 
-		BMW_init(&regwalker, bm, BMW_ISLAND,
+		BMW_init(&regwalker, bm, BMW_ISLAND_MANIFOLD,
 		         BMW_MASK_NOP, BMW_MASK_NOP, FACE_MARK,
 		         BMW_FLAG_NOP, /* no need to check BMW_FLAG_TEST_HIDDEN, faces are already marked by the bmo */
 		         BMW_NIL_LAY);
@@ -180,7 +181,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
 		
 		for (i = 0; i < BLI_array_count(faces); i++) {
 			f_iter = faces[i];
-			BMO_elem_flag_disable(bm, f_iter, FACE_MARK);
+			BMO_elem_flag_disable(bm, f_iter, FACE_TAG);
 			BMO_elem_flag_enable(bm, f_iter, FACE_ORIG);
 		}




More information about the Bf-blender-cvs mailing list