Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-05-11 23:00:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-05-11 23:00:05 +0300
commit544b76ac9cf79bcc64b9f8248984f1d408d32eb8 (patch)
treef58c0a136346e815889392bc9e67089d207c04be
parenta46d930d8b4778a7ccce96b128f833721143d743 (diff)
BMesh: ignore non-manifold face connections
Was showing an error message, now dissolve the faces that and delimit at non-manifold boundaries.
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index c8dff4a8598..52814a82b2f 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);
}