From 8b3f5f755edcd1868369441f50fce7af8b7416e8 Mon Sep 17 00:00:00 2001 From: Peter Fog Date: Sat, 20 Mar 2021 01:29:08 +0100 Subject: 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 --- release/scripts/startup/bl_ui/space_sequencer.py | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) 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") -- cgit v1.2.3