[Bf-blender-cvs] [5c9adc1614f] master: UI: Sequencer menus

William Reynish noreply at git.blender.org
Mon May 20 18:04:37 CEST 2019


Commit: 5c9adc1614f10e6248548fd3bd3494bdc594ce05
Author: William Reynish
Date:   Mon May 20 18:04:35 2019 +0200
Branches: master
https://developer.blender.org/rB5c9adc1614f10e6248548fd3bd3494bdc594ce05

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

===================================================================

M	release/scripts/startup/bl_ui/space_sequencer.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 11e147c7175..2d2c2acf2b1 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -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'}:
+            if stype == 'META':
                 layout.separator()
-                layout.operator("sequencer.rendersize")
-                layout.operator("sequencer.images_separate")
-            elif stype == 'SOUND':
+          

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list