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
This commit is contained in:
parent
680994643c
commit
b6a97baa0e
Notes:
blender-bot
2023-02-14 06:42:53 +01:00
Referenced by commit eee5a0e4ec
, UI: use full width for ID blocks in speaker properties
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
col.template_texture_user()
|
||||
|
||||
col.separator()
|
||||
|
||||
if user or pin_id:
|
||||
layout.separator()
|
||||
|
||||
split = layout.split(percentage=0.65)
|
||||
col = split.column()
|
||||
|
||||
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="")
|
||||
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue