[Bf-blender-cvs] [95a45e308d4] blender2.8: BMesh: Add back call to finish operator
Campbell Barton
noreply at git.blender.org
Thu Apr 19 09:10:35 CEST 2018
Commit: 95a45e308d425f69c0594af92e6e0666b3fd028a
Author: Campbell Barton
Date: Thu Apr 19 09:08:46 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB95a45e308d425f69c0594af92e6e0666b3fd028a
BMesh: Add back call to finish operator
Was commented in multi-edit patch, finish is needed to free memory.
===================================================================
M source/blender/editors/mesh/editmesh_tools.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index e4581253286..94365be6b2e 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -4175,11 +4175,18 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op)
Object *obedit = objects[ob_index];
BMEditMesh *em = BKE_editmesh_from_object(obedit);
+ if (em->bm->totfacesel == 0) {
+ continue;
+ }
+
BMOperator bmop;
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);
+ 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 */
@@ -4192,12 +4199,9 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op)
EDBM_selectmode_flush(em);
- // XXX, TODO
-#if 0
if (!EDBM_op_finish(em, &bmop, op, true)) {
- return OPERATOR_CANCELLED;
+ continue;
}
-#endif
EDBM_update_generic(em, true, true);
}
More information about the Bf-blender-cvs
mailing list