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/space_graph
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/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index db13e2a4024..fd92247ecd8 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -872,11 +872,12 @@ void GRAPH_OT_duplicate(wmOperatorType *ot)
/* ******************** Delete Keyframes Operator ************************* */
-static void delete_graph_keys(bAnimContext *ac)
+static bool delete_graph_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
+ bool modified = false;
/* filter data */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
@@ -888,7 +889,7 @@ static void delete_graph_keys(bAnimContext *ac)
AnimData *adt = ale->adt;
/* delete selected keyframes only */
- delete_fcurve_keys(fcu);
+ modified |= delete_fcurve_keys(fcu);
/* Only delete curve too if it won't be doing anything anymore */
if ((fcu->totvert == 0) &&
@@ -901,20 +902,23 @@ static void delete_graph_keys(bAnimContext *ac)
/* free filtered list */
BLI_freelistN(&anim_data);
+
+ return modified;
}
/* ------------------- */
-static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
+static int graphkeys_delete_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
+ bool modified;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* delete keyframes */
- delete_graph_keys(&ac);
+ modified = delete_graph_keys(&ac);
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
@@ -922,6 +926,9 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
/* set notifier that keyframes have changed */
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
+ if (modified)
+ BKE_report(op->reports, RPT_INFO, "Deleted selected keyframes");
+
return OPERATOR_FINISHED;
}
@@ -933,7 +940,6 @@ void GRAPH_OT_delete(wmOperatorType *ot)
ot->description = "Remove all selected keyframes";
/* api callbacks */
- ot->invoke = WM_operator_confirm;
ot->exec = graphkeys_delete_exec;
ot->poll = graphop_editable_keyframes_poll;