[Bf-blender-cvs] [8b3f5f755ed] master: VSE UI: Cleanup scene panel style

Peter Fog noreply at git.blender.org
Sat Mar 20 01:42:03 CET 2021


Commit: 8b3f5f755edcd1868369441f50fce7af8b7416e8
Author: Peter Fog
Date:   Sat Mar 20 01:29:08 2021 +0100
Branches: master
https://developer.blender.org/rB8b3f5f755edcd1868369441f50fce7af8b7416e8

VSE UI: Cleanup scene panel style

 - Make properties alligned
 - Add decorate to volume
 - Add heading to Grease Pencil and Transparent

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10663

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

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 591cff820fe..b1a32d8c9b8 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -1425,36 +1425,36 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
         return (strip.type == 'SCENE')
 
     def draw(self, context):
+        strip = act_strip(context)
+        scene = strip.scene
+
         layout = self.layout
         layout.use_property_split = True
         layout.use_property_decorate = False
-
-        strip = act_strip(context)
-
         layout.active = not strip.mute
 
-        layout.template_ID(strip, "scene")
+        layout.template_ID(strip, "scene", text="Scene")
+        layout.prop(strip, "scene_input", text="Input")
 
-        scene = strip.scene
-        layout.prop(strip, "scene_input")
+        if strip.scene_input == 'CAMERA':
+            layout.template_ID(strip, "scene_camera", text="Camera")
 
         if scene:
-            layout.prop(scene, "audio_volume", text="Volume")
-
-        if strip.scene_input == 'CAMERA':
-            layout.alignment = 'RIGHT'
-            sub = layout.column(align=True)
-            split = sub.split(factor=0.5, align=True)
+            # Build a manual split layout as a hack to get proper alignment with the rest of the buttons.
+            sub = layout.row(align=True)
+            sub.use_property_decorate = True
+            split = sub.split(factor=0.4, align=True)
             split.alignment = 'RIGHT'
-            split.label(text="Camera")
-            split.template_ID(strip, "scene_camera")
-
-            layout.prop(strip, "use_grease_pencil", text="Show Grease Pencil")
+            split.label(text="Volume")
+            split.prop(scene, "audio_volume", text="")
+            sub.use_property_decorate = False
 
+        if strip.scene_input == 'CAMERA':
+            layout = layout.column(heading="Show")
+            layout.prop(strip, "use_grease_pencil", text="Grease Pencil")
             if scene:
                 # Warning, this is not a good convention to follow.
                 # Expose here because setting the alpha from the 'Render' menu is very inconvenient.
-                # layout.label(text="Preview")
                 layout.prop(scene.render, "film_transparent")



More information about the Bf-blender-cvs mailing list