diff options
author | Richard Antalik <richardantalik@gmail.com> | 2019-03-01 02:10:19 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2019-03-01 02:10:19 +0300 |
commit | 41d1582f1df790ba36a33992eac04f60301f36c7 (patch) | |
tree | 71c33011605a89e505eade78edfec0537fff6d2a /release/scripts | |
parent | 680c7209ecf7315a9818923daf62ae9b1cd4c26b (diff) |
Cleanup and refactor sequencer proxy properties panel
Split SEQUENCER_PT_proxy to:
SEQUENCER_PT_proxy_settings
- global settings and operators
SEQUENCER_PT_strip_proxy
- proxy settings per strip
Author: Guillaume M (mathers)
Reviewed by: ISS, campbellbarton
Differential Revision: https://developer.blender.org/D4262
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 5c692e1e210..7fcc5a07980 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1145,10 +1145,31 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel): col.prop(strip, "color_multiply", text="Multiply") layout.prop(strip, "use_float", text="Convert to Float") +class SEQUENCER_PT_proxy_settings(SequencerButtonsPanel, Panel): + bl_label = "Proxy settings" + bl_category = "Proxy" + @classmethod + def poll(cls, context): + return cls.has_sequencer(context) -class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): - bl_label = "Proxy/Timecode" - bl_category = "Strip" + def draw(self, context): + layout = self.layout + + ed = context.scene.sequence_editor + + flow = layout.column_flow() + flow.prop(ed, "proxy_storage", text="Storage") + if ed.proxy_storage == 'PROJECT': + flow.prop(ed, "proxy_dir", text="Directory") + + col = layout.column() + col.operator("sequencer.enable_proxies") + col.operator("sequencer.rebuild_proxy") + + +class SEQUENCER_PT_strip_proxy(SequencerButtonsPanel, Panel): + bl_label = "Strip Proxy/Timecode" + bl_category = "Proxy" @classmethod def poll(cls, context): @@ -1159,7 +1180,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): if not strip: return False - return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'META', 'MULTICAM'} + return strip.type in {'MOVIE', 'IMAGE', 'META'} def draw_header(self, context): strip = act_strip(context) @@ -1177,10 +1198,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): proxy = strip.proxy flow = layout.column_flow() - flow.prop(ed, "proxy_storage", text="Storage") - if ed.proxy_storage == 'PROJECT': - flow.prop(ed, "proxy_dir", text="Directory") - else: + if ed.proxy_storage == 'PER_STRIP': flow.prop(proxy, "use_proxy_custom_directory") flow.prop(proxy, "use_proxy_custom_file") @@ -1206,10 +1224,6 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): col.prop(proxy, "timecode") - col = layout.column() - col.operator("sequencer.enable_proxies") - col.operator("sequencer.rebuild_proxy") - class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): bl_label = "Scene Preview/Render" @@ -1416,7 +1430,8 @@ classes = ( SEQUENCER_PT_scene, SEQUENCER_PT_mask, SEQUENCER_PT_filter, - SEQUENCER_PT_proxy, + SEQUENCER_PT_proxy_settings, + SEQUENCER_PT_strip_proxy, SEQUENCER_PT_preview, SEQUENCER_PT_view, SEQUENCER_PT_view_safe_areas, |