diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-16 20:12:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-16 20:12:03 +0400 |
commit | e1dd245a1ed65aa4dea22eac8a356b37182924dd (patch) | |
tree | 949e67c390e8f898910cdabe262386069b9faf48 /source/blender/editors/space_nla/nla_ops.c | |
parent | efc6be2002bfb250374fb0f43d1260e5c8c2b0ed (diff) |
more keymap edits
- make sure defaults are not assumed (so reuse last settings doesnt
override)
- replace 0/1 for TRUE/FALSE defines.
Diffstat (limited to 'source/blender/editors/space_nla/nla_ops.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_ops.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index f173a3d3835..55831de876c 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -169,17 +169,23 @@ void nla_operatortypes(void) static void nla_keymap_channels(wmKeyMap *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); + kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "extend", TRUE); /* channel operations */ /* add tracks */ - WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "above_selected", 1); + kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "above_selected", FALSE); + kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "above_selected", TRUE); /* delete tracks */ WM_keymap_add_item(keymap, "NLA_OT_delete_tracks", XKEY, KM_PRESS, 0, 0); |