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>2017-03-11 12:39:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-03-11 12:50:32 +0300
commit5afe4c787f0ed3ac30f7609c7f07c5092a20eac9 (patch)
tree2e424260547c1615efdc21aa9a3c9bfa2bc23ab3 /source/blender/editors/mesh/editmesh_intersect.c
parent5be8adf8c08e8b774577045bc9b1bc0c15353caa (diff)
BMesh: add BM_mesh_separate_faces
Fast-path for bmesh split operator which duplicates and deletes. Use when only separating faces, currently used by the intersect tool.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_intersect.c')
-rw-r--r--source/blender/editors/mesh/editmesh_intersect.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c
index bc9088401db..49bfde77032 100644
--- a/source/blender/editors/mesh/editmesh_intersect.c
+++ b/source/blender/editors/mesh/editmesh_intersect.c
@@ -51,6 +51,7 @@
#include "mesh_intern.h" /* own include */
#include "tools/bmesh_intersect.h"
+#include "tools/bmesh_separate.h"
/* detect isolated holes and fill them */
@@ -196,13 +197,9 @@ static int edbm_intersect_exec(bContext *C, wmOperator *op)
if (use_separate_cut) {
/* detach selected/un-selected faces */
- BMOperator bmop;
- EDBM_op_init(em, &bmop, op, "split geom=%hf use_only_faces=%b", BM_ELEM_SELECT, true);
- BMO_op_exec(em->bm, &bmop);
- if (!EDBM_op_finish(em, &bmop, op, true)) {
- /* should never happen! */
- BKE_report(op->reports, RPT_ERROR, "Error separating");
- }
+ BM_mesh_separate_faces(
+ bm,
+ BM_elem_cb_check_hflag_enabled_simple(const BMFace *, BM_ELEM_SELECT));
}
if (has_isect) {