diff options
author | Emanuel Claesson <emanuel.claesson@gmail.com> | 2013-11-25 07:55:26 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-25 15:21:45 +0400 |
commit | 3ca4387bc80b17d945d3ced2f55fd2ae6d962b1b (patch) | |
tree | 18e50d21863c51a95067176513d225fc0ee802a7 /source/blender/editors/armature | |
parent | 20769605593e6f850d30169175a01757f3e0fbb6 (diff) |
UI: remove unnecessary confirmation popups
This makes a number of operators no longer ask for confirmation, rather it will
show an info message after performing the operation. Ref T37422 for decision. In
particular, these were changed:
* Delete objects, bones, keyframes, masks, mask curves, motion tracks, markers.
* Clear and delete keyframes in the 3D view.
* Align bone to parents.
* Separate bones from armature.
* Group/ungroup metastrips in sequencer.
* Copy/paste objects to/from buffer.
Reviewed By: brecht, dingto
Differential Revision: http://developer.blender.org/D35
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/armature_edit.c | 13 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_relations.c | 5 |
2 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 1bc5bf0fd74..55764a8919f 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -1020,6 +1020,8 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op) if ((arm->flag & ARM_MIRROR_EDIT) && (actmirb->parent)) bone_align_to_bone(arm->edbo, actmirb, actmirb->parent); + + BKE_reportf(op->reports, RPT_INFO, "Aligned bone '%s' to parent", actbone->name); } } else { @@ -1042,8 +1044,10 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op) } } CTX_DATA_END; + + BKE_reportf(op->reports, RPT_INFO, "%d bones aligned to bone '%s'", CTX_DATA_COUNT(C, selected_editable_bones), actbone->name); } - + /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); @@ -1058,7 +1062,6 @@ void ARMATURE_OT_align(wmOperatorType *ot) ot->description = "Align selected bones to the active bone (or to their parent)"; /* api callbacks */ - ot->invoke = WM_operator_confirm; ot->exec = armature_align_bones_exec; ot->poll = ED_operator_editarmature; @@ -1108,12 +1111,13 @@ void ARMATURE_OT_split(wmOperatorType *ot) /* previously delete_armature */ /* only editmode! */ -static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) +static int armature_delete_selected_exec(bContext *C, wmOperator *op) { bArmature *arm; EditBone *curBone, *ebone_next; bConstraint *con; Object *obedit = CTX_data_edit_object(C); // XXX get from context + int removed_num = 0; arm = obedit->data; /* cancel if nothing selected */ @@ -1170,10 +1174,12 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) if (curBone->flag & BONE_SELECTED) { if (curBone == arm->act_edbone) arm->act_edbone = NULL; ED_armature_edit_bone_remove(arm, curBone); + removed_num++; } } } + BKE_reportf(op->reports, RPT_INFO, "Deleted %d bones", removed_num); ED_armature_sync_selection(arm->edbo); @@ -1190,7 +1196,6 @@ void ARMATURE_OT_delete(wmOperatorType *ot) ot->description = "Remove selected bones from the armature"; /* api callbacks */ - ot->invoke = WM_operator_confirm; ot->exec = armature_delete_selected_exec; ot->poll = ED_operator_editarmature; diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index cd24e94f9e9..087e9a86241 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -454,7 +454,7 @@ static void separate_armature_bones(Object *ob, short sel) } /* separate selected bones into their armature */ -static int separate_armature_exec(bContext *C, wmOperator *UNUSED(op)) +static int separate_armature_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); @@ -520,6 +520,8 @@ static int separate_armature_exec(bContext *C, wmOperator *UNUSED(op)) ED_armature_to_edit(obedit); + BKE_report(op->reports, RPT_INFO, "Separated bones"); + /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, obedit); @@ -537,7 +539,6 @@ void ARMATURE_OT_separate(wmOperatorType *ot) ot->description = "Isolate selected bones into a separate armature"; /* callbacks */ - ot->invoke = WM_operator_confirm; ot->exec = separate_armature_exec; ot->poll = ED_operator_editarmature; |