forked from bartvdbraak/blender
UI: Properties hierarchical nesting
Make hierarchy more clear and consistent in Render, Object and Particles
This commit is contained in:
parent
993f43dc9e
commit
962af13b18
@ -257,19 +257,33 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
|
|||||||
col.active = is_dupli
|
col.active = is_dupli
|
||||||
col.prop(obj, "display_type", text="Display As")
|
col.prop(obj, "display_type", text="Display As")
|
||||||
|
|
||||||
split = flow.split(factor=0.6)
|
|
||||||
split.prop(obj, "show_bounds", text="Bounds")
|
|
||||||
row = split.row()
|
|
||||||
row.active = obj.show_bounds or (obj.display_type == 'BOUNDS')
|
|
||||||
row.prop(obj, "display_bounds_type", text="")
|
|
||||||
|
|
||||||
if is_geometry or is_empty_image or is_gpencil:
|
if is_geometry or is_empty_image or is_gpencil:
|
||||||
# Only useful with object having faces/materials...
|
# Only useful with object having faces/materials...
|
||||||
col = flow.column()
|
col = flow.column()
|
||||||
col.prop(obj, "color")
|
col.prop(obj, "color")
|
||||||
|
|
||||||
|
|
||||||
class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
|
class OBJECT_PT_display_bounds(ObjectButtonsPanel, Panel):
|
||||||
|
bl_label = "Boundary"
|
||||||
|
bl_parent_id = "OBJECT_PT_display"
|
||||||
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|
||||||
|
def draw_header(self, context):
|
||||||
|
|
||||||
|
obj = context.object
|
||||||
|
|
||||||
|
self.layout.prop(obj, "show_bounds", text="")
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
obj = context.object
|
||||||
|
layout.use_property_split = True
|
||||||
|
|
||||||
|
layout.active = obj.show_bounds or (obj.display_type == 'BOUNDS')
|
||||||
|
layout.prop(obj, "display_bounds_type", text="Shape")
|
||||||
|
|
||||||
|
|
||||||
|
class OBJECT_PT_instancing(ObjectButtonsPanel, Panel):
|
||||||
bl_label = "Instancing"
|
bl_label = "Instancing"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|
||||||
@ -287,13 +301,6 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
|
|||||||
if ob.instance_type == 'VERTS':
|
if ob.instance_type == 'VERTS':
|
||||||
layout.prop(ob, "use_instance_vertices_rotation", text="Rotation")
|
layout.prop(ob, "use_instance_vertices_rotation", text="Rotation")
|
||||||
|
|
||||||
elif ob.instance_type == 'FACES':
|
|
||||||
col = flow.column()
|
|
||||||
col.prop(ob, "use_instance_faces_scale", text="Scale")
|
|
||||||
sub = col.column()
|
|
||||||
sub.active = ob.use_instance_faces_scale
|
|
||||||
sub.prop(ob, "instance_faces_scale", text="Inherit Scale")
|
|
||||||
|
|
||||||
elif ob.instance_type == 'COLLECTION':
|
elif ob.instance_type == 'COLLECTION':
|
||||||
col = flow.column()
|
col = flow.column()
|
||||||
col.prop(ob, "instance_collection", text="Collection")
|
col.prop(ob, "instance_collection", text="Collection")
|
||||||
@ -310,6 +317,29 @@ from .properties_animviz import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class OBJECT_PT_instancing_size(ObjectButtonsPanel, Panel):
|
||||||
|
bl_label = "Size"
|
||||||
|
bl_parent_id = "OBJECT_PT_instancing"
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
ob = context.object
|
||||||
|
return ob.instance_type == 'FACES'
|
||||||
|
|
||||||
|
def draw_header(self, context):
|
||||||
|
|
||||||
|
ob = context.object
|
||||||
|
self.layout.prop(ob, "use_instance_faces_scale", text="")
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
ob = context.object
|
||||||
|
layout.use_property_split = True
|
||||||
|
|
||||||
|
layout.active = ob.use_instance_faces_scale
|
||||||
|
layout.prop(ob, "instance_faces_scale", text="Inherit Scale")
|
||||||
|
|
||||||
|
|
||||||
class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||||
#bl_label = "Object Motion Paths"
|
#bl_label = "Object Motion Paths"
|
||||||
bl_context = "object"
|
bl_context = "object"
|
||||||
@ -362,10 +392,12 @@ classes = (
|
|||||||
OBJECT_PT_relations,
|
OBJECT_PT_relations,
|
||||||
COLLECTION_MT_specials,
|
COLLECTION_MT_specials,
|
||||||
OBJECT_PT_collections,
|
OBJECT_PT_collections,
|
||||||
OBJECT_PT_duplication,
|
OBJECT_PT_instancing,
|
||||||
|
OBJECT_PT_instancing_size,
|
||||||
OBJECT_PT_motion_paths,
|
OBJECT_PT_motion_paths,
|
||||||
OBJECT_PT_motion_paths_display,
|
OBJECT_PT_motion_paths_display,
|
||||||
OBJECT_PT_display,
|
OBJECT_PT_display,
|
||||||
|
OBJECT_PT_display_bounds,
|
||||||
OBJECT_PT_custom_props,
|
OBJECT_PT_custom_props,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1773,17 +1773,35 @@ class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel):
|
|||||||
else:
|
else:
|
||||||
sub.prop(part, "clump_factor", slider=True)
|
sub.prop(part, "clump_factor", slider=True)
|
||||||
sub.prop(part, "clump_shape", slider=True)
|
sub.prop(part, "clump_shape", slider=True)
|
||||||
sub = col.column(align=True)
|
|
||||||
sub.prop(part, "use_clump_noise")
|
|
||||||
subsub = sub.column()
|
|
||||||
subsub.enabled = part.use_clump_noise
|
|
||||||
subsub.prop(part, "clump_noise_size")
|
|
||||||
|
|
||||||
if part.child_type == 'SIMPLE':
|
if part.child_type == 'SIMPLE':
|
||||||
sub.prop(part, "twist")
|
col.prop(part, "twist")
|
||||||
sub.prop(part, "use_twist_curve")
|
col.prop(part, "use_twist_curve")
|
||||||
if part.use_twist_curve:
|
if part.use_twist_curve:
|
||||||
sub.template_curve_mapping(part, "twist_curve")
|
col.template_curve_mapping(part, "twist_curve")
|
||||||
|
|
||||||
|
|
||||||
|
class PARTICLE_PT_children_clumping_noise(ParticleButtonsPanel, Panel):
|
||||||
|
bl_label = "Clump Noise"
|
||||||
|
bl_parent_id = "PARTICLE_PT_children_clumping"
|
||||||
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||||
|
|
||||||
|
def draw_header(self, context):
|
||||||
|
|
||||||
|
part = particle_get_settings(context)
|
||||||
|
|
||||||
|
self.layout.prop(part, "use_clump_noise", text="")
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
|
||||||
|
part = particle_get_settings(context)
|
||||||
|
|
||||||
|
layout.use_property_split = True
|
||||||
|
layout.enabled = part.use_clump_noise
|
||||||
|
|
||||||
|
layout.prop(part, "clump_noise_size")
|
||||||
|
|
||||||
|
|
||||||
class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel):
|
||||||
@ -2176,6 +2194,7 @@ classes = (
|
|||||||
PARTICLE_PT_children,
|
PARTICLE_PT_children,
|
||||||
PARTICLE_PT_children_parting,
|
PARTICLE_PT_children_parting,
|
||||||
PARTICLE_PT_children_clumping,
|
PARTICLE_PT_children_clumping,
|
||||||
|
PARTICLE_PT_children_clumping_noise,
|
||||||
PARTICLE_PT_children_roughness,
|
PARTICLE_PT_children_roughness,
|
||||||
PARTICLE_PT_children_kink,
|
PARTICLE_PT_children_kink,
|
||||||
PARTICLE_PT_hair_shape,
|
PARTICLE_PT_hair_shape,
|
||||||
|
@ -495,17 +495,34 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel):
|
|||||||
props = scene.eevee
|
props = scene.eevee
|
||||||
rd = scene.render
|
rd = scene.render
|
||||||
|
|
||||||
split = layout.split()
|
|
||||||
split.prop(props, "use_overscan")
|
|
||||||
row = split.row()
|
|
||||||
row.active = props.use_overscan
|
|
||||||
row.prop(props, "overscan_size", text="")
|
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.prop(rd, "filter_size")
|
col.prop(rd, "filter_size")
|
||||||
col.prop(rd, "alpha_mode", text="Alpha")
|
col.prop(rd, "alpha_mode", text="Alpha")
|
||||||
|
|
||||||
|
|
||||||
|
class RENDER_PT_eevee_film_overscan(RenderButtonsPanel, Panel):
|
||||||
|
bl_label = "Overscan"
|
||||||
|
bl_parent_id = "RENDER_PT_eevee_film"
|
||||||
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
||||||
|
|
||||||
|
def draw_header(self, context):
|
||||||
|
|
||||||
|
scene = context.scene
|
||||||
|
props = scene.eevee
|
||||||
|
|
||||||
|
self.layout.prop(props, "use_overscan", text="")
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
layout.use_property_split = True
|
||||||
|
scene = context.scene
|
||||||
|
props = scene.eevee
|
||||||
|
|
||||||
|
layout.active = props.use_overscan
|
||||||
|
layout.prop(props, "overscan_size", text="Size")
|
||||||
|
|
||||||
|
|
||||||
class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel):
|
class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Hair"
|
bl_label = "Hair"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
@ -688,6 +705,7 @@ classes = (
|
|||||||
RENDER_PT_eevee_indirect_lighting,
|
RENDER_PT_eevee_indirect_lighting,
|
||||||
RENDER_PT_eevee_indirect_lighting_display,
|
RENDER_PT_eevee_indirect_lighting_display,
|
||||||
RENDER_PT_eevee_film,
|
RENDER_PT_eevee_film,
|
||||||
|
RENDER_PT_eevee_film_overscan,
|
||||||
RENDER_PT_opengl_lighting,
|
RENDER_PT_opengl_lighting,
|
||||||
RENDER_PT_opengl_color,
|
RENDER_PT_opengl_color,
|
||||||
RENDER_PT_opengl_options,
|
RENDER_PT_opengl_options,
|
||||||
|
Loading…
Reference in New Issue
Block a user