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>2015-11-25 03:55:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-25 03:55:46 +0300
commitb6084d56c9a202796b68219a7027a7e735fd427a (patch)
tree2399eec1d5d2db194bf432152adc41c6ba6fc269 /source/blender/editors/mesh/editmesh_tools.c
parent69cdddd4cf3ebe5987477399effabff892233608 (diff)
BMesh: remove double faces when triangulating
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index a0017f93b8a..3cd3b7ec86e 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3818,12 +3818,20 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op)
BMOperator bmop;
const int quad_method = RNA_enum_get(op->ptr, "quad_method");
const int ngon_method = RNA_enum_get(op->ptr, "ngon_method");
+ BMOIter oiter;
+ BMFace *f;
EDBM_op_init(em, &bmop, op, "triangulate faces=%hf quad_method=%i ngon_method=%i", BM_ELEM_SELECT, quad_method, ngon_method);
BMO_op_exec(em->bm, &bmop);
/* select the output */
BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_SELECT, true);
+
+ /* remove the doubles */
+ BMO_ITER (f, &oiter, bmop.slots_out, "face_map_double.out", BM_FACE) {
+ BM_face_kill(em->bm, f);
+ }
+
EDBM_selectmode_flush(em);
if (!EDBM_op_finish(em, &bmop, op, true)) {