UI: Empty image Properties layout tweaks
- Enable decorators - Use sub-panel for transparency Differential Revision: https://developer.blender.org/D6692 Reviewed by Brecht van Lommel
This commit is contained in:
parent
d4daecb223
commit
acb576c762
|
@ -37,7 +37,6 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
ob = context.object
|
||||
|
||||
|
@ -45,12 +44,6 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
|
|||
layout.prop(ob, "empty_display_size", text="Size")
|
||||
|
||||
if ob.empty_display_type == 'IMAGE':
|
||||
layout.prop(ob, "use_empty_image_alpha")
|
||||
|
||||
col = layout.column()
|
||||
col.active = ob.use_empty_image_alpha
|
||||
col.prop(ob, "color", text="Opacity", index=3, slider=True)
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(ob, "empty_image_offset", text="Offset X", index=0)
|
||||
col.prop(ob, "empty_image_offset", text="Y", index=1)
|
||||
|
@ -58,11 +51,32 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
|
|||
col = layout.column()
|
||||
col.row().prop(ob, "empty_image_depth", text="Depth", expand=True)
|
||||
col.row().prop(ob, "empty_image_side", text="Side", expand=True)
|
||||
col.prop(ob, "show_empty_image_orthographic", text="Display Orthographic")
|
||||
col.prop(ob, "show_empty_image_perspective", text="Display Perspective")
|
||||
col.prop(ob, "show_empty_image_orthographic",
|
||||
text="Display Orthographic")
|
||||
col.prop(ob, "show_empty_image_perspective",
|
||||
text="Display Perspective")
|
||||
col.prop(ob, "show_empty_image_only_axis_aligned")
|
||||
|
||||
|
||||
class DATA_PT_empty_alpha(DataButtonsPanel, Panel):
|
||||
bl_label = "Transparency"
|
||||
bl_parent_id = "DATA_PT_empty"
|
||||
|
||||
def draw_header(self, context):
|
||||
ob = context.object
|
||||
|
||||
self.layout.prop(ob, "use_empty_image_alpha", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
|
||||
ob = context.object
|
||||
|
||||
layout.active = ob.use_empty_image_alpha
|
||||
layout.prop(ob, "color", text="Opacity", index=3, slider=True)
|
||||
|
||||
|
||||
class DATA_PT_empty_image(DataButtonsPanel, Panel):
|
||||
bl_label = "Image"
|
||||
|
||||
|
@ -74,13 +88,15 @@ class DATA_PT_empty_image(DataButtonsPanel, Panel):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
ob = context.object
|
||||
layout.template_ID(ob, "data", open="image.open", unlink="object.unlink_data")
|
||||
layout.template_ID(ob, "data", open="image.open",
|
||||
unlink="object.unlink_data")
|
||||
layout.separator()
|
||||
layout.template_image(ob, "data", ob.image_user, compact=True)
|
||||
|
||||
|
||||
classes = (
|
||||
DATA_PT_empty,
|
||||
DATA_PT_empty_alpha,
|
||||
DATA_PT_empty_image,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue