Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Fog <tintwotin>2020-12-16 01:15:32 +0300
committerRichard Antalik <richardantalik@gmail.com>2020-12-16 01:50:18 +0300
commitfad80a95fd08ec87a37f30f0b94a7061d4e382f2 (patch)
treee3abdad69ca94c37ed28a24f7f31203f89bd2a79 /release/scripts/startup/bl_ui/space_sequencer.py
parentf44dea05583889107f640bbf45f546409432303f (diff)
VSE: Add Overlay popover panels
Add panels with overlay settings for strips and preview and overlay enable/disable button. Entries from the View menus moved to the overlay panels, which will simplify cluttered View menus. Additional options have been added: - Strip Name - Strip Source(ex. path) - Strip Duration So users can now select what info they need to see on the strips. When No text is displayed, waveforms are drawn in full height. Reviewed By: ISS, HooglyBoogly, pablovazquez Differential Revision: https://developer.blender.org/D9751
Diffstat (limited to 'release/scripts/startup/bl_ui/space_sequencer.py')
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py113
1 files changed, 96 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 3f92fce81f6..8ef961960ff 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -139,12 +139,11 @@ class SEQUENCER_HT_header(Header):
SEQUENCER_MT_editor_menus.draw_collapsible(context, layout)
- if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
+ layout.separator_spacer()
- layout.separator_spacer()
+ if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
layout.prop(st, "display_mode", text="", icon_only=True)
-
layout.prop(st, "preview_channels", text="", icon_only=True)
gpd = context.gpencil_data
@@ -158,6 +157,13 @@ class SEQUENCER_HT_header(Header):
row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
+ row = layout.row(align=True)
+ row.prop(st, "show_strip_overlay", text="", icon='OVERLAY')
+ sub = row.row(align=True)
+ sub.popover(panel="SEQUENCER_PT_overlay", text="")
+ sub.active = st.show_strip_overlay
+
+
class SEQUENCER_MT_editor_menus(Menu):
bl_idname = "SEQUENCER_MT_editor_menus"
bl_label = ""
@@ -176,6 +182,83 @@ class SEQUENCER_MT_editor_menus(Menu):
layout.menu("SEQUENCER_MT_strip")
+class SEQUENCER_PT_overlay(Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'HEADER'
+ bl_label = "Overlays"
+ bl_ui_units_x = 7
+
+ def draw(self, _context):
+ pass
+
+
+class SEQUENCER_PT_overlay(Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'HEADER'
+ bl_label = "Overlays"
+ bl_ui_units_x = 7
+
+ def draw(self, _context):
+ pass
+
+
+class SEQUENCER_PT_preview_overlay(Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'HEADER'
+ bl_parent_id = 'SEQUENCER_PT_overlay'
+ bl_label = "Preview Overlays"
+
+ @classmethod
+ def poll(cls, context):
+ st = context.space_data
+ return st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} and st.display_mode == 'IMAGE'
+
+
+ def draw(self, context):
+ ed = context.scene.sequence_editor
+ st = context.space_data
+ layout = self.layout
+
+ layout.active = st.show_strip_overlay
+ layout.prop(ed, "show_overlay", text="Frame Overlay")
+ layout.prop(st, "show_safe_areas", text="Safe Areas")
+ layout.prop(st, "show_metadata", text="Metadata")
+ layout.prop(st, "show_annotation", text="Annotations")
+
+
+class SEQUENCER_PT_sequencer_overlay(Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'HEADER'
+ bl_parent_id = 'SEQUENCER_PT_overlay'
+ bl_label = "Sequencer Overlays"
+
+ @classmethod
+ def poll(cls, context):
+ st = context.space_data
+ return st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
+
+
+ def draw(self, context):
+ st = context.space_data
+ layout = self.layout
+
+ layout.active = st.show_strip_overlay
+
+ layout.prop(st, "show_strip_name", text="Name")
+ layout.prop(st, "show_strip_source", text="Source")
+ layout.prop(st, "show_strip_duration", text="Duration")
+
+ layout.separator()
+
+ layout.prop(st, "show_strip_offset", text="Offsets")
+ layout.prop(st, "show_fcurves", text="F-Curves")
+
+ layout.separator()
+
+ layout.prop_menu_enum(st, "waveform_display_type")
+
+
+
class SEQUENCER_MT_view_cache(Menu):
bl_label = "Cache"
@@ -294,6 +377,12 @@ class SEQUENCER_MT_view(Menu):
layout.operator("view2d.zoom_border", text="Zoom")
layout.menu("SEQUENCER_MT_preview_zoom")
+ if st.display_mode == 'IMAGE':
+ layout.prop(st, "use_zoom_to_fit")
+ elif st.display_mode == 'WAVEFORM':
+ layout.separator()
+ layout.prop(st, "show_separate_color", text="Show Separate Color Channels")
+
layout.separator()
layout.menu("SEQUENCER_MT_proxy")
@@ -318,22 +407,8 @@ class SEQUENCER_MT_view(Menu):
layout.separator()
layout.prop(st, "show_seconds")
- layout.prop(st, "show_strip_offset")
- layout.prop(st, "show_fcurves")
layout.prop(st, "show_markers")
layout.menu("SEQUENCER_MT_view_cache", text="Show Cache")
- layout.prop_menu_enum(st, "waveform_display_type", text="Show Waveforms")
-
- if is_preview:
- layout.separator()
- if st.display_mode == 'IMAGE':
- layout.prop(st, "use_zoom_to_fit")
- layout.prop(ed, "show_overlay", text="Show Frame Overlay")
- layout.prop(st, "show_safe_areas", text="Show Safe Areas")
- layout.prop(st, "show_metadata", text="Show Metadata")
- layout.prop(st, "show_annotation", text="Show Annotations")
- elif st.display_mode == 'WAVEFORM':
- layout.prop(st, "show_separate_color", text="Show Separate Color Channels")
layout.separator()
@@ -2222,6 +2297,10 @@ classes = (
SEQUENCER_PT_active_tool,
SEQUENCER_PT_strip,
+ SEQUENCER_PT_overlay,
+ SEQUENCER_PT_preview_overlay,
+ SEQUENCER_PT_sequencer_overlay,
+
SEQUENCER_PT_effect,
SEQUENCER_PT_scene,
SEQUENCER_PT_mask,