diff options
author | Joshua Leung <aligorith@gmail.com> | 2012-03-09 17:31:20 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2012-03-09 17:31:20 +0400 |
commit | 15ec2a90c928d71fb29b0d2edaf0c58b98fe6fa6 (patch) | |
tree | 76f649ffb1fd9b608a71cf070654137989fdde3c /source/blender/editors/space_sequencer | |
parent | 48f284d54446afe451d9284c26658e06f03483c4 (diff) |
Markers Tweak for Sequencer
Applied the keymaps hack which is used for other animation editors to allow
markers to be added and renamed anywhere from within the sequencer strips
region, instead of just when the cursor is over the scrollbar.
Other operations where the hotkeys conflict though (delete, move) can still be
done only from the scrollbar, or better still, from the Timeline.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_ops.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index bf2d9ce833e..e53d06c9786 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -1,6 +1,4 @@ - /* - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -45,6 +43,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_markers.h" #include "ED_transform.h" /* transform keymap */ #include "sequencer_intern.h" @@ -118,16 +117,19 @@ void sequencer_operatortypes(void) void sequencer_keymap(wmKeyConfig *keyconf) { - wmKeyMap *keymap= WM_keymap_find(keyconf, "SequencerCommon", SPACE_SEQ, 0); + wmKeyMap *keymap; wmKeyMapItem *kmi; - + + /* Common items ------------------------------------------------------------------ */ + keymap = WM_keymap_find(keyconf, "SequencerCommon", SPACE_SEQ, 0); + kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, KM_SHIFT, 0); RNA_string_set(kmi->ptr, "data_path", "scene.sequence_editor.show_overlay"); /* operators common to sequence and preview view */ WM_keymap_add_item(keymap, "SEQUENCER_OT_view_toggle", TABKEY, KM_PRESS, KM_CTRL, 0); - /* operators for sequence */ + /* Strips Region --------------------------------------------------------------- */ keymap= WM_keymap_find(keyconf, "Sequencer", SPACE_SEQ, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0); @@ -287,7 +289,12 @@ void sequencer_keymap(wmKeyConfig *keyconf) RNA_int_set(kmi->ptr, "value", 0); transform_keymap_for_space(keyconf, keymap, SPACE_SEQ); - + + /* special markers hotkeys for anim editors: see note in definition of this function */ + ED_marker_keymap_animedit_conflictfree(keymap); + + + /* Preview Region ----------------------------------------------------------- */ keymap= WM_keymap_find(keyconf, "SequencerPreview", SPACE_SEQ, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all_preview", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0); @@ -307,6 +314,5 @@ void sequencer_keymap(wmKeyConfig *keyconf) RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f); RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f); #endif - } |