diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-12-18 15:47:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-12-18 15:47:40 +0300 |
commit | 9f61350a05eb77dfa28ccce57ca15269e9bafcf1 (patch) | |
tree | d54230932dcb580e856ecc4e62fb2ce5aa1e95d9 /release/scripts | |
parent | d4aaa4f9b661cd2423a4745227b9883f5f1f4089 (diff) |
Sequener: Move waveform-draw option into view menu
also simplify preview/sequencer checks
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 7eaf300c781..f59d4e8d980 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -72,7 +72,6 @@ class SEQUENCER_HT_header(Header): row.prop(scene, "lock_frame_selection_to_range", text="", toggle=True) layout.prop(st, "view_type", expand=True, text="") - layout.prop(st, "waveform_draw_type", text="") if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: layout.prop(st, "display_mode", expand=True, text="") @@ -163,8 +162,10 @@ class SEQUENCER_MT_view(Menu): layout = self.layout st = context.space_data + is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} + is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'} - if st.view_type in {'PREVIEW'}: + if st.view_type == 'PREVIEW': # Specifying the REGION_PREVIEW context is needed in preview-only # mode, else the lookup for the shortcut will fail in # wm_keymap_item_find_props() (see #32595). @@ -174,10 +175,10 @@ class SEQUENCER_MT_view(Menu): layout.separator() - if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: + if is_sequencer_view: layout.operator("sequencer.view_all", text="View all Sequences") layout.operator("sequencer.view_selected") - if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: + if is_preview: layout.operator_context = 'INVOKE_REGION_PREVIEW' layout.operator("sequencer.view_all_preview", text="Fit preview in window") @@ -195,12 +196,14 @@ class SEQUENCER_MT_view(Menu): # # XXX, invokes in the header view # layout.operator("sequencer.view_ghost_border", text="Overlay Border") - if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: + if is_sequencer_view: layout.prop(st, "show_seconds") layout.prop(st, "show_frame_indicator") layout.prop(st, "show_strip_offset") - if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: + layout.prop_menu_enum(st, "waveform_draw_type") + + if is_preview: if st.display_mode == 'IMAGE': layout.prop(st, "show_safe_margin") elif st.display_mode == 'WAVEFORM': @@ -208,7 +211,7 @@ class SEQUENCER_MT_view(Menu): layout.separator() - if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: + if is_sequencer_view: layout.prop(st, "use_marker_sync") layout.separator() |