diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_sequencer.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 117 |
1 files changed, 78 insertions, 39 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index af0c23e7892..ca25c29960c 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -29,6 +29,7 @@ from bpy.app.translations import ( ) from bl_ui.properties_grease_pencil_common import ( AnnotationDataPanel, + AnnotationOnionSkin, ) from bl_ui.space_toolsystem_common import ( ToolActivePanelHelper, @@ -275,7 +276,7 @@ class SEQUENCER_MT_view(Menu): if is_sequencer_view: layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("sequencer.view_selected", text="Frame Selected") - layout.operator("sequencer.view_all", text="Frame All") + layout.operator("sequencer.view_all") layout.operator("view2d.zoom_border", text="Zoom") if is_preview: @@ -309,6 +310,7 @@ class SEQUENCER_MT_view(Menu): layout.prop(st, "show_seconds") layout.prop(st, "show_locked_time") layout.prop(st, "show_strip_offset") + layout.prop(st, "show_fcurves") layout.separator() layout.prop(st, "show_markers") @@ -404,6 +406,8 @@ class SEQUENCER_MT_select(Menu): layout.separator() layout.operator("sequencer.select_box", text="Box Select") + props = layout.operator("sequencer.select_box", text="Box Select (Include Handles)") + props.include_handles = True layout.separator() @@ -716,8 +720,8 @@ class SEQUENCER_MT_strip(Menu): layout.menu("SEQUENCER_MT_strip_transform") layout.separator() - layout.operator("sequencer.cut", text="Cut").type = 'SOFT' - layout.operator("sequencer.cut", text="Hold Cut").type = 'HARD' + layout.operator("sequencer.split", text="Split").type = 'SOFT' + layout.operator("sequencer.split", text="Hold Split").type = 'HARD' layout.separator() layout.operator("sequencer.copy", text="Copy") @@ -781,7 +785,7 @@ class SEQUENCER_MT_context_menu(Menu): layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("sequencer.cut", text="Cut").type = 'SOFT' + layout.operator("sequencer.split", text="Split").type = 'SOFT' layout.separator() @@ -842,7 +846,7 @@ class SEQUENCER_MT_context_menu(Menu): }: layout.separator() layout.menu("SEQUENCER_MT_strip_effect") - elif strip_type in 'MOVIE': + elif strip_type == 'MOVIE': layout.separator() layout.menu("SEQUENCER_MT_strip_movie") elif strip_type == 'IMAGE': @@ -1113,11 +1117,11 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): if i == strip.multicam_source: sub = row.row(align=True) sub.enabled = False - sub.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i + sub.operator("sequencer.split_multicam", text="%d" % i).camera = i else: sub_1 = row.row(align=True) sub_1.enabled = True - sub_1.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i + sub_1.operator("sequencer.split_multicam", text="%d" % i).camera = i if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW: for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)): @@ -1135,6 +1139,8 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): col = layout.column(align=True) if strip_type == 'SPEED': col.prop(strip, "multiply_speed") + col.prop(strip, "frame_interpolation_mode") + elif strip_type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}: col.prop(strip, "use_default_fade", text="Default fade") if not strip.use_default_fade: @@ -1684,18 +1690,15 @@ class SEQUENCER_PT_adjust_transform(SequencerButtonsPanel, Panel): layout = self.layout strip = act_strip(context) - layout.active = not strip.mute - - split = layout.split() + layout.use_property_split = True + layout.use_property_decorate = False - col = split.column() - col.alignment = 'RIGHT' - col.label(text="Mirror") + layout.active = not strip.mute - col = split.column() - row = col.row(align=True) - row.prop(strip, "use_flip_x", text="X", toggle=True) - row.prop(strip, "use_flip_y", text="Y", toggle=True) + row = layout.row(heading="Mirror") + sub = row.row(align=True) + sub.prop(strip, "use_flip_x", text="X", toggle=True) + sub.prop(strip, "use_flip_y", text="Y", toggle=True) class SEQUENCER_PT_adjust_video(SequencerButtonsPanel, Panel): @@ -1799,12 +1802,12 @@ class SEQUENCER_PT_cache_settings(SequencerButtonsPanel, Panel): ed = context.scene.sequence_editor - col = layout.column() + col = layout.column(heading="Cache", align=True) - col.prop(ed, "use_cache_raw") - col.prop(ed, "use_cache_preprocessed") - col.prop(ed, "use_cache_composite") - col.prop(ed, "use_cache_final") + col.prop(ed, "use_cache_raw", text="Raw") + col.prop(ed, "use_cache_preprocessed", text="Pre-Processed") + col.prop(ed, "use_cache_composite", text="Composite") + col.prop(ed, "use_cache_final", text="Final") col.separator() col.prop(ed, "recycle_max_cost") @@ -1868,21 +1871,19 @@ class SEQUENCER_PT_strip_proxy(SequencerButtonsPanel, Panel): flow = layout.column_flow() if ed.proxy_storage == 'PER_STRIP': - flow.prop(proxy, "use_proxy_custom_directory") - flow.prop(proxy, "use_proxy_custom_file") - + col = layout.column(heading="Custom Proxy") + col.prop(proxy, "use_proxy_custom_directory", text="Directory") if proxy.use_proxy_custom_directory and not proxy.use_proxy_custom_file: - flow.prop(proxy, "directory") + col.prop(proxy, "directory") + col.prop(proxy, "use_proxy_custom_file", text="File") if proxy.use_proxy_custom_file: - flow.prop(proxy, "filepath") + col.prop(proxy, "filepath") - box = layout.box() - row = box.row(align=True) - row.prop(strip.proxy, "build_25") - row.prop(strip.proxy, "build_75") - row = box.row(align=True) - row.prop(strip.proxy, "build_50") - row.prop(strip.proxy, "build_100") + row = layout.row(heading="Resolutions", align=True) + row.prop(strip.proxy, "build_25", toggle=True) + row.prop(strip.proxy, "build_50", toggle=True) + row.prop(strip.proxy, "build_75", toggle=True) + row.prop(strip.proxy, "build_100", toggle=True) layout.use_property_split = True layout.use_property_decorate = False @@ -1923,10 +1924,10 @@ class SEQUENCER_PT_strip_cache(SequencerButtonsPanel, Panel): strip = act_strip(context) layout.active = strip.override_cache_settings - col = layout.column() - col.prop(strip, "use_cache_raw") - col.prop(strip, "use_cache_preprocessed") - col.prop(strip, "use_cache_composite") + col = layout.column(heading="Cache") + col.prop(strip, "use_cache_raw", text="Raw") + col.prop(strip, "use_cache_preprocessed", text="Pre-Processed") + col.prop(strip, "use_cache_composite", text="Composite") class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): @@ -1972,7 +1973,9 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel): col.prop(st, "show_separate_color") col.prop(st, "proxy_render_size") - col.prop(ed, "use_prefetch") + + if ed: + col.prop(ed, "use_prefetch") class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel): @@ -1980,6 +1983,12 @@ class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel): bl_category = "View" bl_options = {'DEFAULT_CLOSED'} + @classmethod + def poll(cls, context): + if not context.scene.sequence_editor: + return False + return SequencerButtonsPanel_Output.poll(context) + def draw_header(self, context): scene = context.scene ed = scene.sequence_editor @@ -2084,10 +2093,12 @@ class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel): box = layout.box() row = box.row() + row.use_property_decorate = False row.prop(mod, "show_expanded", text="", emboss=False) row.prop(mod, "name", text="") row.prop(mod, "mute", text="") + row.use_property_decorate = True sub = row.row(align=True) props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_UP') @@ -2159,6 +2170,33 @@ class SEQUENCER_PT_annotation(AnnotationDataPanel, SequencerButtonsPanel_Output, # But, it should only show up when there are images in the preview region +class SEQUENCER_PT_annotation_onion(AnnotationOnionSkin, SequencerButtonsPanel_Output, Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'UI' + bl_category = "View" + + @staticmethod + def has_preview(context): + st = context.space_data + return st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} + + @classmethod + def poll(cls, context): + if context.annotation_data_owner is None: + return False + elif type(context.annotation_data_owner) is bpy.types.Object: + return False + else: + gpl = context.active_annotation_layer + if gpl is None: + return False + + return cls.has_preview(context) + + # NOTE: this is just a wrapper around the generic GP Panel + # But, it should only show up when there are images in the preview region + + class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} _context_path = "scene.sequence_editor.active_strip" @@ -2232,6 +2270,7 @@ classes = ( SEQUENCER_PT_view_safe_areas_center_cut, SEQUENCER_PT_annotation, + SEQUENCER_PT_annotation_onion, ) if __name__ == "__main__": # only for live edit. |