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:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_sequencer.py')
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py135
1 files changed, 118 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..e79b5d3e2c8 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -129,6 +129,8 @@ class SEQUENCER_HT_header(Header):
layout = self.layout
st = context.space_data
+ scene = context.scene
+ sequencer_tool_settings = context.tool_settings.sequencer_tool_settings
show_region_tool_header = st.show_region_tool_header
@@ -139,12 +141,17 @@ class SEQUENCER_HT_header(Header):
SEQUENCER_MT_editor_menus.draw_collapsible(context, layout)
- if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
-
+ if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
+ layout.separator_spacer()
+ row = layout.row(align=True)
+ row.prop(sequencer_tool_settings, "fit_method", text="")
layout.separator_spacer()
- layout.prop(st, "display_mode", text="", icon_only=True)
+ if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
+ if st.view_type == 'PREVIEW':
+ layout.separator_spacer()
+ layout.prop(st, "display_mode", text="", icon_only=True)
layout.prop(st, "preview_channels", text="", icon_only=True)
gpd = context.gpencil_data
@@ -157,6 +164,12 @@ class SEQUENCER_HT_header(Header):
if tool_settings.use_proportional_edit:
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"
@@ -176,6 +189,80 @@ 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 +381,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 +411,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()
@@ -629,6 +708,22 @@ class SEQUENCER_MT_add_effect(Menu):
col.enabled = selected_sequences_len(context) != 0
+class SEQUENCER_MT_strip_image_transform(Menu):
+ bl_label = "Image Transform"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("sequencer.strip_transform_fit", text="Scale To Fit").fit_method = 'FIT'
+ layout.operator("sequencer.strip_transform_fit", text="Scale to Fill").fit_method = 'FILL'
+ layout.operator("sequencer.strip_transform_fit", text="Stretch To Fill").fit_method = 'STRETCH'
+ layout.separator()
+
+ layout.operator("sequencer.strip_transform_clear", text="Clear Position").property = 'POSITION'
+ layout.operator("sequencer.strip_transform_clear", text="Clear Scale").property = 'SCALE'
+ layout.operator("sequencer.strip_transform_clear", text="Clear Rotation").property = 'ROTATION'
+ layout.operator("sequencer.strip_transform_clear", text="Clear All").property = 'ALL'
+
class SEQUENCER_MT_strip_transform(Menu):
bl_label = "Transform"
@@ -723,6 +818,7 @@ class SEQUENCER_MT_strip(Menu):
layout.separator()
layout.menu("SEQUENCER_MT_strip_transform")
+ layout.menu("SEQUENCER_MT_strip_image_transform")
layout.separator()
layout.operator("sequencer.split", text="Split").type = 'SOFT'
@@ -2214,6 +2310,7 @@ classes = (
SEQUENCER_MT_strip_effect,
SEQUENCER_MT_strip_movie,
SEQUENCER_MT_strip,
+ SEQUENCER_MT_strip_image_transform,
SEQUENCER_MT_strip_transform,
SEQUENCER_MT_strip_input,
SEQUENCER_MT_strip_lock_mute,
@@ -2222,6 +2319,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,