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-05-30 14:41:41 +0400
committerJoshua Leung <aligorith@gmail.com>2009-05-30 14:41:41 +0400
commit32d0533f78c63d5d95b693e1e6e65144203dc42a (patch)
treeb602e71ceb4f7a9fbfbaeba97585da8c3c6eac0e /source/blender/editors/space_nla/nla_ops.c
parent72205f45e4e4dfd14460d693ccda30f7677ae9be (diff)
NLA SoC: More UI work + 'Push down' tool
'UI Work' * Added more drawing code for drawing NLA data * Made the operators for the 'channel-list' of NLA work. A special version of borderselect for the NLA channel-list (due to the different vertical order) still needs to be coded though. 'Push Down' tool The active action of each AnimData block, represented by the reddy/orange channel, can be added to the NLA stack as a new action by using the 'snow-flake' icon/button (probably need a special icon for this later). This will add a new NLA track and an NLA strip referencing this action. The AnimData block's 'active action' slot will then be left empty. (Unfortunately, there still seems to be a bug here, which I'll check on later)
Diffstat (limited to 'source/blender/editors/space_nla/nla_ops.c')
-rw-r--r--source/blender/editors/space_nla/nla_ops.c44
1 files changed, 34 insertions, 10 deletions
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index f0e3bd5bca5..ea450a08475 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -54,17 +54,15 @@
#include "ED_space_api.h"
#include "ED_screen.h"
-#include "BIF_gl.h"
-
#include "WM_api.h"
#include "WM_types.h"
+#include "RNA_access.h"
+
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "ED_markers.h"
-
#include "nla_intern.h" // own include
@@ -72,20 +70,46 @@
void nla_operatortypes(void)
{
- //WM_operatortype_append();
+ /* channels */
+ WM_operatortype_append(NLA_OT_channels_click);
+ /* select */
+ // ...
}
/* ************************** registration - keymaps **********************************/
static void nla_keymap_channels (wmWindowManager *wm, ListBase *keymap)
{
- //wmKeymapItem *kmi;
+ /* NLA-specific (different to standard channels keymap) -------------------------- */
+ /* selection */
+ /* click-select */
+ // XXX for now, only leftmouse....
+ 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);
+ /* 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);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+ /* borderselect */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0);
- /* transform system */
- //transform_keymap_for_space(wm, keymap, SPACE_NLA);
+ /* settings */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_disable", WKEY, KM_PRESS, KM_ALT, 0);
+
+ /* settings - specialised hotkeys */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_editable_toggle", TABKEY, KM_PRESS, 0, 0);
+
+ /* expand/collapse */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, 0, 0);
+
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1);
}
static void nla_keymap_main (wmWindowManager *wm, ListBase *keymap)
@@ -111,11 +135,11 @@ void nla_keymap(wmWindowManager *wm)
*
* However, those operations which involve clicking on channels and/or the placement of them in the view are implemented here instead
*/
- keymap= WM_keymap_listbase(wm, "NLA_Channels", SPACE_NLA, 0);
+ keymap= WM_keymap_listbase(wm, "NLA Channels", SPACE_NLA, 0);
nla_keymap_channels(wm, keymap);
/* data */
- keymap= WM_keymap_listbase(wm, "NLA_Data", SPACE_NLA, 0);
+ keymap= WM_keymap_listbase(wm, "NLA Data", SPACE_NLA, 0);
nla_keymap_main(wm, keymap);
}