diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-17 18:22:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-17 18:22:54 +0400 |
commit | 1cb7dc55b40ab5270502ac76ed81887bc227ae02 (patch) | |
tree | 458509650109dc5a15017fd22cffdcb51fa2ca94 /source/blender/editors/space_sequencer/sequencer_ops.c | |
parent | a7386bf9862a8d2960931c9d6df21549473adeec (diff) |
sequencer numpad keys for zoom levels
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_ops.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_ops.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index f1ca2490095..559a090a2ee 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -79,6 +79,7 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_view_selected); WM_operatortype_append(SEQUENCER_OT_view_all_preview); WM_operatortype_append(SEQUENCER_OT_view_toggle); + WM_operatortype_append(SEQUENCER_OT_view_zoom_ratio); /* sequencer_select.c */ WM_operatortype_append(SEQUENCER_OT_select_all_toggle); @@ -224,5 +225,17 @@ void sequencer_keymap(wmKeyConfig *keyconf) 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); + + + keymap= WM_keymap_find(keyconf, "SequencerPreview", SPACE_SEQ, 0); + + /* would prefer to use numpad keys for job */ + RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 8.0f); + RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 4.0f); + RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD2, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 2.0f); + RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD1, KM_PRESS, 0, 0)->ptr, "ratio", 1.0f); + RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD2, KM_PRESS, 0, 0)->ptr, "ratio", 0.5f); + 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); } |