diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-02-14 05:30:33 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-02-14 05:30:33 +0300 |
commit | 52525a00f7f83e8349b98ab9824fe92cb41d2e8a (patch) | |
tree | cc31c5466bac86a41d5fa8a55a1a5bbcd3d7b633 /source/blender/editors/space_action/action_ops.c | |
parent | 650916941ee7d459711dec9a6a73a1d6c56f3c20 (diff) |
DopeSheet: Add menu entries and hotkeys to select all keyframes
left/right to current frame in dope sheet
This commit separates out this selection functionality out of the
click-selection operator into a separate operator, so that hotkeys and
menu entries can be assigned to it.
This is based on an idea+patch (#23738) submitted by Torsten Rupp
(rupp), though I've ultimately decided not to go with the suggested
implementation as I don't think this fits that well under the "column"
select operator.
Todo: Graph Editor support will be coming shortly...
Diffstat (limited to 'source/blender/editors/space_action/action_ops.c')
-rw-r--r-- | source/blender/editors/space_action/action_ops.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index ea36ce98ecb..3b448becf8b 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -58,6 +58,7 @@ void action_operatortypes(void) WM_operatortype_append(ACTION_OT_select_linked); WM_operatortype_append(ACTION_OT_select_more); WM_operatortype_append(ACTION_OT_select_less); + WM_operatortype_append(ACTION_OT_select_leftright); /* editing */ WM_operatortype_append(ACTION_OT_snap); @@ -96,8 +97,16 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "extend", 1); RNA_boolean_set(kmi->ptr, "column", 1); - kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_enum_set(kmi->ptr, "left_right", ACTKEYS_LRSEL_TEST); + + /* select left/right */ + WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + + kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT); + kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT); /* deselect all */ WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); |