UI: Sequencer menus
More updates to Sequencer menus from Peter Fog. - Rename Cut operators in the UI to be more clear - Re-organize the context menu to be nicer and more useful - Select menu is clearer - other assorted fixes and changes for clarity
This commit is contained in:
parent
40d5254741
commit
5c9adc1614
|
@ -173,6 +173,21 @@ class SEQUENCER_MT_view_cache(Menu):
|
|||
col.prop(ed, "show_cache_composite")
|
||||
|
||||
|
||||
class SEQUENCER_MT_range(Menu):
|
||||
bl_label = "Range"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("anim.previewrange_set", text = "Set Preview Range")
|
||||
layout.operator("anim.previewrange_clear", text = "Clear Preview Range")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("anim.start_frame_set", text = "Set Start Frame")
|
||||
layout.operator("anim.end_frame_set", text = "Set End Frame")
|
||||
|
||||
|
||||
class SEQUENCER_MT_view(Menu):
|
||||
bl_label = "View"
|
||||
|
||||
|
@ -198,11 +213,16 @@ class SEQUENCER_MT_view(Menu):
|
|||
|
||||
if is_sequencer_view:
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
layout.operator("sequencer.view_all", text="Frame All")
|
||||
layout.operator("sequencer.view_selected", text="Frame Selected")
|
||||
layout.operator("sequencer.view_all", text="Frame All")
|
||||
layout.operator("view2d.zoom_border", text = "Zoom")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
#layout.menu("SEQUENCER_MT_frame")
|
||||
layout.menu("SEQUENCER_MT_navigation")
|
||||
layout.menu("SEQUENCER_MT_range")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@ -240,11 +260,6 @@ class SEQUENCER_MT_view(Menu):
|
|||
layout.menu("SEQUENCER_MT_view_cache")
|
||||
layout.prop_menu_enum(st, "waveform_display_type")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("anim.previewrange_clear")
|
||||
layout.operator("anim.previewrange_set")
|
||||
|
||||
if is_preview:
|
||||
if st.display_mode == 'IMAGE':
|
||||
layout.prop(st, "show_safe_areas")
|
||||
|
@ -264,6 +279,50 @@ class SEQUENCER_MT_view(Menu):
|
|||
layout.menu("INFO_MT_area")
|
||||
|
||||
|
||||
class SEQUENCER_MT_select_handle(Menu):
|
||||
bl_label = "Select Handle"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("sequencer.select_handles", text="Left").side = 'LEFT'
|
||||
layout.operator("sequencer.select_handles", text="Right").side = 'RIGHT'
|
||||
layout.operator("sequencer.select_handles", text="Both").side = 'BOTH'
|
||||
|
||||
|
||||
class SEQUENCER_MT_select_channel(Menu):
|
||||
bl_label = "Select Channel"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("sequencer.select_active_side", text="Left").side = 'LEFT'
|
||||
layout.operator("sequencer.select_active_side", text="Right").side = 'RIGHT'
|
||||
|
||||
|
||||
class SEQUENCER_MT_select_linked(Menu):
|
||||
bl_label = "Select Linked"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("sequencer.select_linked", text = "All")
|
||||
layout.operator("sequencer.select_less", text = "Less")
|
||||
layout.operator("sequencer.select_more", text = "More")
|
||||
|
||||
class SEQUENCER_MT_select_playhead(Menu):
|
||||
bl_label = "Select Playhead"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
props = layout.operator("sequencer.select", text="Left")
|
||||
props.left_right = 'LEFT'
|
||||
props.linked_time = True
|
||||
props = layout.operator("sequencer.select", text="Right")
|
||||
props.left_right = 'RIGHT'
|
||||
props.linked_time = True
|
||||
|
||||
|
||||
class SEQUENCER_MT_select(Menu):
|
||||
bl_label = "Select"
|
||||
|
||||
|
@ -280,24 +339,13 @@ class SEQUENCER_MT_select(Menu):
|
|||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT'
|
||||
layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT'
|
||||
props = layout.operator("sequencer.select", text="All Strips to the Left")
|
||||
props.left_right = 'LEFT'
|
||||
props.linked_time = True
|
||||
props = layout.operator("sequencer.select", text="All Strips to the Right")
|
||||
props.left_right = 'RIGHT'
|
||||
props.linked_time = True
|
||||
layout.menu("SEQUENCER_MT_select_playhead", text ="Playhead")
|
||||
layout.menu("SEQUENCER_MT_select_handle", text ="Handle")
|
||||
layout.menu("SEQUENCER_MT_select_channel", text ="Channel")
|
||||
layout.menu("SEQUENCER_MT_select_linked", text ="Linked")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH'
|
||||
layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT'
|
||||
layout.operator("sequencer.select_handles", text="Right Handle").side = 'RIGHT'
|
||||
layout.separator()
|
||||
layout.operator_menu_enum("sequencer.select_grouped", "type", text="Grouped")
|
||||
layout.operator("sequencer.select_linked")
|
||||
layout.operator("sequencer.select_less")
|
||||
layout.operator("sequencer.select_more")
|
||||
|
||||
|
||||
class SEQUENCER_MT_marker(Menu):
|
||||
|
@ -346,6 +394,10 @@ class SEQUENCER_MT_navigation(Menu):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("screen.animation_play")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.view_frame", text="Go to Playhead")
|
||||
|
||||
layout.separator()
|
||||
|
@ -555,6 +607,7 @@ class SEQUENCER_MT_strip_lock_mute(Menu):
|
|||
layout.operator("sequencer.mute").unselected = False
|
||||
layout.operator("sequencer.unmute").unselected = False
|
||||
layout.operator("sequencer.mute", text="Mute Unselected Strips").unselected = True
|
||||
layout.operator("sequencer.unmute", text="Unmute Deselected Strips").unselected = True
|
||||
|
||||
|
||||
class SEQUENCER_MT_strip(Menu):
|
||||
|
@ -568,6 +621,10 @@ class SEQUENCER_MT_strip(Menu):
|
|||
layout.separator()
|
||||
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.separator()
|
||||
layout.operator("sequencer.copy", text="Copy")
|
||||
layout.operator("sequencer.paste", text="Paste")
|
||||
|
@ -575,18 +632,18 @@ class SEQUENCER_MT_strip(Menu):
|
|||
layout.operator("sequencer.delete", text="Delete...")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("sequencer.cut", text="Cut (Hard) at Playhead").type = 'HARD'
|
||||
layout.operator("sequencer.cut", text="Cut (Soft) at Playhead").type = 'SOFT'
|
||||
|
||||
layout.separator()
|
||||
layout.operator("sequencer.deinterlace_selected_movies")
|
||||
layout.operator("sequencer.rebuild_proxy")
|
||||
layout.menu("SEQUENCER_MT_strip_lock_mute")
|
||||
|
||||
strip = act_strip(context)
|
||||
|
||||
if strip:
|
||||
stype = strip.type
|
||||
|
||||
if stype != 'SOUND':
|
||||
layout.separator()
|
||||
layout.operator_menu_enum("sequencer.strip_modifier_add", "type", text="Add Modifier")
|
||||
layout.operator("sequencer.strip_modifier_copy", text = "Copy Modifiers to Selection")
|
||||
|
||||
if stype in {
|
||||
'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
|
||||
'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW',
|
||||
|
@ -602,6 +659,7 @@ class SEQUENCER_MT_strip(Menu):
|
|||
layout.separator()
|
||||
layout.operator("sequencer.rendersize")
|
||||
layout.operator("sequencer.images_separate")
|
||||
layout.operator("sequencer.deinterlace_selected_movies")
|
||||
elif stype == 'META':
|
||||
layout.separator()
|
||||
layout.operator("sequencer.meta_separate")
|
||||
|
@ -614,7 +672,7 @@ class SEQUENCER_MT_strip(Menu):
|
|||
layout.menu("SEQUENCER_MT_strip_input")
|
||||
|
||||
layout.separator()
|
||||
layout.menu("SEQUENCER_MT_strip_lock_mute")
|
||||
layout.operator("sequencer.rebuild_proxy")
|
||||
|
||||
|
||||
class SEQUENCER_MT_context_menu(Menu):
|
||||
|
@ -625,58 +683,55 @@ class SEQUENCER_MT_context_menu(Menu):
|
|||
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
|
||||
layout.operator("sequencer.copy", text="Copy", icon='COPYDOWN')
|
||||
layout.operator("sequencer.paste", text="Paste", icon='PASTEDOWN')
|
||||
layout.operator("sequencer.cut", text="Cut").type = 'SOFT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.copy", text="Copy", icon='COPYDOWN')
|
||||
layout.operator("sequencer.paste", text="Paste", icon='PASTEDOWN')
|
||||
layout.operator("sequencer.duplicate_move")
|
||||
layout.operator("sequencer.delete", text="Delete...")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.cut", text="Cut (Hard) at frame").type = 'HARD'
|
||||
layout.operator("sequencer.cut", text="Cut (Soft) at frame").type = 'SOFT'
|
||||
layout.operator("sequencer.slip", text="Slip Strip Contents")
|
||||
layout.operator("sequencer.snap")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.snap")
|
||||
layout.operator("sequencer.offset_clear")
|
||||
layout.operator("sequencer.gap_remove").all = False
|
||||
layout.operator("sequencer.gap_insert")
|
||||
|
||||
strip = act_strip(context)
|
||||
|
||||
if strip:
|
||||
stype = strip.type
|
||||
|
||||
if stype in {
|
||||
'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
|
||||
'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW',
|
||||
'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT',
|
||||
'GAUSSIAN_BLUR', 'TEXT',
|
||||
}:
|
||||
layout.separator()
|
||||
layout.operator_menu_enum("sequencer.change_effect_input", "swap")
|
||||
layout.operator_menu_enum("sequencer.change_effect_type", "type")
|
||||
layout.operator("sequencer.reassign_inputs")
|
||||
layout.operator("sequencer.swap_inputs")
|
||||
elif stype in {'IMAGE', 'MOVIE'}:
|
||||
layout.separator()
|
||||
layout.operator("sequencer.rendersize")
|
||||
layout.operator("sequencer.images_separate")
|
||||
elif stype == 'SOUND':
|
||||
layout.separator()
|
||||
layout.operator("sequencer.crossfade_sounds")
|
||||
elif stype == 'META':
|
||||
if stype == 'META':
|
||||
layout.separator()
|
||||
layout.operator("sequencer.meta_separate")
|
||||
|
||||
if stype != 'SOUND':
|
||||
layout.separator()
|
||||
layout.operator_menu_enum("sequencer.strip_modifier_add", "type", text="Add Modifier")
|
||||
layout.operator("sequencer.strip_modifier_copy", text = "Copy Modifiers to Selection")
|
||||
|
||||
if selected_sequences_len(context) >= 2:
|
||||
layout.separator()
|
||||
col = layout.column()
|
||||
col.menu("SEQUENCER_MT_add_transitions", text="Add Transition")
|
||||
elif selected_sequences_len(context) >= 2:
|
||||
layout.separator()
|
||||
layout.operator("sequencer.crossfade_sounds", text="Crossfade Sounds")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.meta_make")
|
||||
layout.operator("sequencer.meta_toggle", text="Toggle Meta")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.menu("SEQUENCER_MT_strip_input")
|
||||
layout.menu("SEQUENCER_MT_strip_lock_mute")
|
||||
|
||||
|
||||
class SequencerButtonsPanel:
|
||||
|
@ -1467,7 +1522,7 @@ class SEQUENCER_PT_cache_settings(SequencerButtonsPanel, Panel):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return cls.has_sequencer(context) and context.scene.sequence_editor
|
||||
return cls.has_sequencer(context)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -1487,7 +1542,7 @@ class SEQUENCER_PT_proxy_settings(SequencerButtonsPanel, Panel):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return cls.has_sequencer(context) and context.scene.sequence_editor
|
||||
return cls.has_sequencer(context)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -1567,10 +1622,6 @@ class SEQUENCER_PT_strip_proxy(SequencerButtonsPanel, Panel):
|
|||
|
||||
col.prop(proxy, "timecode", text="Timecode Index")
|
||||
|
||||
col = layout.column()
|
||||
col.operator("sequencer.enable_proxies")
|
||||
col.operator("sequencer.rebuild_proxy")
|
||||
|
||||
|
||||
class SEQUENCER_PT_strip_cache(SequencerButtonsPanel, Panel):
|
||||
bl_label = "Strip Cache"
|
||||
|
@ -1834,9 +1885,14 @@ classes = (
|
|||
SEQUENCER_MT_change,
|
||||
SEQUENCER_HT_header,
|
||||
SEQUENCER_MT_editor_menus,
|
||||
SEQUENCER_MT_range,
|
||||
SEQUENCER_MT_view,
|
||||
SEQUENCER_MT_view_cache,
|
||||
SEQUENCER_MT_view_toggle,
|
||||
SEQUENCER_MT_select_playhead,
|
||||
SEQUENCER_MT_select_handle,
|
||||
SEQUENCER_MT_select_channel,
|
||||
SEQUENCER_MT_select_linked,
|
||||
SEQUENCER_MT_select,
|
||||
SEQUENCER_MT_marker,
|
||||
SEQUENCER_MT_navigation,
|
||||
|
|
Loading…
Reference in New Issue