diff options
author | Pablo Vazquez <venomgfx@gmail.com> | 2018-07-15 02:15:32 +0300 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2018-07-15 02:22:33 +0300 |
commit | b6a97baa0efa65da678d72408cb29eebf1ee658a (patch) | |
tree | 199f0663e704b2561591e438532cb0951b1f8ce4 /release/scripts/startup | |
parent | 680994643cf76f3b0643d0fc4d8a32094431c026 (diff) |
UI: Use full width for ID blocks in World, Light, Camera, Texture
Also close Preview panel for lights by default and move World custom props last
Diffstat (limited to 'release/scripts/startup')
4 files changed, 17 insertions, 21 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 3b5f21d616e..2d5fbf4b52f 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -62,13 +62,10 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel): cam = context.camera space = context.space_data - split = layout.split(percentage=0.65) if ob: - split.template_ID(ob, "data") - split.separator() + layout.template_ID(ob, "data") elif cam: - split.template_ID(space, "pin_id") - split.separator() + layout.template_ID(space, "pin_id") class DATA_PT_lens(CameraButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_light.py b/release/scripts/startup/bl_ui/properties_data_light.py index 057f7dffce0..a92414c0e7c 100644 --- a/release/scripts/startup/bl_ui/properties_data_light.py +++ b/release/scripts/startup/bl_ui/properties_data_light.py @@ -45,16 +45,15 @@ class DATA_PT_context_light(DataButtonsPanel, Panel): light = context.light space = context.space_data - split = layout.split(percentage=0.65) - if ob: - split.template_ID(ob, "data") + layout.template_ID(ob, "data") elif light: - split.template_ID(space, "pin_id") + layout.template_ID(space, "pin_id") class DATA_PT_preview(DataButtonsPanel, Panel): bl_label = "Preview" + bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} def draw(self, context): diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index b08b47fbe77..b3b7341a734 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -123,27 +123,28 @@ class TEXTURE_PT_context(TextureButtonsPanel, Panel): use_pin_id = space.use_pin_id user = context.texture_user + col = layout.column() + if not (use_pin_id and isinstance(pin_id, bpy.types.Texture)): pin_id = None if not pin_id: - layout.template_texture_user() - - if user or pin_id: - layout.separator() + col.template_texture_user() - split = layout.split(percentage=0.65) - col = split.column() + col.separator() + if user or pin_id: if pin_id: col.template_ID(space, "pin_id") else: propname = context.texture_user_property.identifier col.template_ID(user, propname, new="texture.new") + col.separator() + if tex: - split = layout.split(percentage=0.2) - split.label(text="Type:") + split = col.split(percentage=0.2) + split.label(text="Type") split.prop(tex, "type", text="") diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index 52a769fd223..b6ea8054b0c 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -50,11 +50,10 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel): world = context.world space = context.space_data - split = layout.split(percentage=0.85) if scene: - split.template_ID(scene, "world", new="world.new") + layout.template_ID(scene, "world", new="world.new") elif world: - split.template_ID(space, "pin_id") + layout.template_ID(space, "pin_id") class EEVEE_WORLD_PT_mist(WorldButtonsPanel, Panel): @@ -125,9 +124,9 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel): classes = ( WORLD_PT_context_world, - WORLD_PT_custom_props, EEVEE_WORLD_PT_surface, EEVEE_WORLD_PT_mist, + WORLD_PT_custom_props, ) if __name__ == "__main__": # only for live edit. |