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:
authorJoshua Leung <aligorith@gmail.com>2009-09-27 08:22:04 +0400
committerJoshua Leung <aligorith@gmail.com>2009-09-27 08:22:04 +0400
commitfbfa8d2f812095eef100b1fdd67ce766bf884844 (patch)
tree10addf45adc73c262fbb2b5e2c2f3096a6fcf8ff /source/blender/editors/space_action/action_edit.c
parent69995bb1b32a081dab987926e0c9f3b94cd63209 (diff)
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature: * It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.) * Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying. * Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region. --> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen... --> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors... Other tweaks: * Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon * Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though. * Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too. * Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
Diffstat (limited to 'source/blender/editors/space_action/action_edit.c')
-rw-r--r--source/blender/editors/space_action/action_edit.c72
1 files changed, 38 insertions, 34 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 9e05c482ecb..865d072d938 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -89,6 +89,44 @@
#include "action_intern.h"
/* ************************************************************************** */
+/* ACTION MANAGEMENT */
+
+/* ******************** New Action Operator *********************** */
+
+static int act_new_exec(bContext *C, wmOperator *op)
+{
+ bAction *action;
+
+ // XXX need to restore behaviour to copy old actions...
+ action= add_empty_action("Action");
+
+ /* combined with RNA property, this will assign & increase user,
+ so decrease here to compensate for that */
+ action->id.us--;
+
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void ACT_OT_new (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New";
+ ot->idname= "ACT_OT_new";
+ ot->description= "Create new action.";
+
+ /* api callbacks */
+ ot->exec= act_new_exec;
+ // NOTE: this is used in the NLA too...
+ //ot->poll= ED_operator_action_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ************************************************************************** */
/* KEYFRAME-RANGE STUFF */
/* *************************** Calculate Range ************************** */
@@ -1331,38 +1369,4 @@ void ACT_OT_mirror (wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", prop_actkeys_mirror_types, 0, "Type", "");
}
-/* ******************** New Action Operator *********************** */
-
-static int act_new_exec(bContext *C, wmOperator *op)
-{
- bAction *action;
-
- // XXX need to restore behaviour to copy old actions...
- action= add_empty_action("Action");
-
- /* combined with RNA property, this will assign & increase user,
- so decrease here to compensate for that */
- action->id.us--;
-
- /* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void ACT_OT_new (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "New";
- ot->idname= "ACT_OT_new";
- ot->description= "Create new action.";
-
- /* api callbacks */
- ot->exec= act_new_exec;
- ot->poll= ED_operator_action_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
/* ************************************************************************** */