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-06-11 07:19:08 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-11 07:19:08 +0400
commitf0f9034966be8692250686aee74048294960aad3 (patch)
tree52ff0d77a378dee974752f258067b4842ddee2ff /source/blender/editors/space_nla/nla_ops.c
parent4a29d0c1a36359c3e08a90beb80cd40857305c80 (diff)
NLA SoC: Operator for adding new NLA-Tracks
New tracks can be added in the following ways (with the mouse hovering over the channels-list): * Shift-A - this will add a new track at the top of the stack (i.e. above all the existing NLA-tracks but below the Active Action) for every AnimData block where there was a selected NLA-Track * Ctrl-Shift-A - this will add a new track above every selected one
Diffstat (limited to 'source/blender/editors/space_nla/nla_ops.c')
-rw-r--r--source/blender/editors/space_nla/nla_ops.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 14c6f2a32d2..6cba19bb2cf 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -124,6 +124,8 @@ void nla_operatortypes(void)
WM_operatortype_append(NLA_OT_channels_click);
WM_operatortype_append(NLA_OT_channels_select_border);
+ WM_operatortype_append(NLA_OT_add_tracks);
+
/* select */
WM_operatortype_append(NLAEDIT_OT_click_select);
WM_operatortype_append(NLAEDIT_OT_select_border);
@@ -148,9 +150,14 @@ static void nla_keymap_channels (wmWindowManager *wm, ListBase *keymap)
WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
- /* borderselect */
+ /* borderselect */
WM_keymap_add_item(keymap, "NLA_OT_channels_select_border", BKEY, KM_PRESS, 0, 0);
+ /* channel operations */
+ /* add tracks */
+ WM_keymap_add_item(keymap, "NLA_OT_add_tracks", AKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_add_tracks", AKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "above_selected", 1);
+
/* General Animation Channels keymap (see anim_channels.c) ----------------------- */
/* deselect all */
WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", AKEY, KM_PRESS, 0, 0);