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:
authorEmanuel Claesson <emanuel.claesson@gmail.com>2013-11-25 07:55:26 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-25 15:21:45 +0400
commit3ca4387bc80b17d945d3ced2f55fd2ae6d962b1b (patch)
tree18e50d21863c51a95067176513d225fc0ee802a7 /source/blender/editors/armature/armature_edit.c
parent20769605593e6f850d30169175a01757f3e0fbb6 (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/armature_edit.c')
-rw-r--r--source/blender/editors/armature/armature_edit.c13
1 files changed, 9 insertions, 4 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;