DopeSheet: Add menu entries and hotkeys to select all keyframes
[blender.git] / source / blender / editors / space_action / action_ops.c
index ea36ce98ecba813138492c5682ff10c1f053b56a..3b448becf8b1fdbdb4f1ff7e7131f4ff428d2c4b 100644 (file)
@@ -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);