diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-04-19 10:49:44 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-04-19 10:49:44 +0300 |
commit | 163b631122b94713e68c4f30ee3edfe36278376e (patch) | |
tree | e5585f3a2962988b4f2d7f95a2ed44f1546a9dca /source/blender/editors | |
parent | 16fac020e07d7ad0caa5901c0740c88e9772194f (diff) | |
parent | 95a45e308d425f69c0594af92e6e0666b3fd028a (diff) |
Merge branch 'blender2.8' of git.blender.org:blender into blender2.8
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 14 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 16 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 3 |
3 files changed, 16 insertions, 17 deletions
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); } diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 248501a7baf..2550c4006f2 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -468,9 +468,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op) FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob) { if ((ob != obact) && (ob->type == obact->type)) { - if (ob->flag & SELECT) { - ED_object_editmode_enter_ex(scene, ob, EM_WAITCURSOR | EM_NO_CONTEXT); - } + ED_object_editmode_enter_ex(scene, ob, EM_WAITCURSOR | EM_NO_CONTEXT); } } FOREACH_SELECTED_OBJECT_END; @@ -482,9 +480,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op) FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob) { if ((ob != obact) && (ob->type == obact->type)) { - if (ob->flag & SELECT) { - ED_object_editmode_exit_ex(NULL, scene, ob, EM_FREEDATA | EM_WAITCURSOR); - } + ED_object_editmode_exit_ex(NULL, scene, ob, EM_FREEDATA | EM_WAITCURSOR); } } FOREACH_SELECTED_OBJECT_END; @@ -560,9 +556,7 @@ static int posemode_exec(bContext *C, wmOperator *op) (ob->type == OB_ARMATURE) && (ob->mode & mode_flag)) { - if (ob->flag & SELECT) { - ED_object_posemode_exit_ex(bmain, ob); - } + ED_object_posemode_exit_ex(bmain, ob); } } FOREACH_SELECTED_OBJECT_END; @@ -580,9 +574,7 @@ static int posemode_exec(bContext *C, wmOperator *op) (ob->mode == OB_MODE_OBJECT) && (!ID_IS_LINKED(ob))) { - if (ob->flag & SELECT) { - ED_object_posemode_enter_ex(bmain, ob); - } + ED_object_posemode_enter_ex(bmain, ob); } } FOREACH_SELECTED_OBJECT_END; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 4f332c09ce2..2ce699aa6e2 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2063,6 +2063,9 @@ void TEXT_OT_delete(wmOperatorType *ot) ot->exec = text_delete_exec; ot->poll = text_edit_poll; + /* flags */ + ot->flag = OPTYPE_UNDO; + /* properties */ RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete"); } |