[Bf-blender-cvs] [04d9316cf36] blender2.8: UI: use single column layout for particles
Campbell Barton
noreply at git.blender.org
Sat Jun 2 21:53:44 CEST 2018
Commit: 04d9316cf362f6d0c5fa9ed38aa3d0c6419ccf4e
Author: Campbell Barton
Date: Sat Jun 2 21:40:33 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB04d9316cf362f6d0c5fa9ed38aa3d0c6419ccf4e
UI: use single column layout for particles
Also minor changes to other panels.
Patch by @billreynish
===================================================================
M release/scripts/startup/bl_ui/properties_animviz.py
M release/scripts/startup/bl_ui/properties_material.py
M release/scripts/startup/bl_ui/properties_particle.py
M release/scripts/startup/bl_ui/properties_render.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py
index 9782d5a072c..901e15c181a 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -37,27 +37,26 @@ class MotionPathButtonsPanel:
mps = avs.motion_path
# Display Range
- layout.row().prop(mps, "type", expand=True)
+ layout.use_property_split = True
+ layout.row().prop(mps, "type")
- split = layout.split()
+ col = layout.column()
- col = split.column()
- col.label(text="Display Range:")
sub = col.column(align=True)
if mps.type == 'CURRENT_FRAME':
- sub.prop(mps, "frame_before", text="Before")
+ sub.prop(mps, "frame_before", text="Frame Range Before")
sub.prop(mps, "frame_after", text="After")
elif mps.type == 'RANGE':
- sub.prop(mps, "frame_start", text="Start")
+ sub.prop(mps, "frame_start", text="Frame Range Start")
sub.prop(mps, "frame_end", text="End")
sub.prop(mps, "frame_step", text="Step")
- col = split.column()
+ col = layout.column(align=True)
if bones:
col.label(text="Cache for Bone:")
else:
- col.label(text="Cache:")
+ col.label(text="Cache")
if mpath:
sub = col.column(align=True)
@@ -81,17 +80,15 @@ class MotionPathButtonsPanel:
sub.operator("object.paths_calculate", text="Calculate...", icon='OBJECT_DATA')
# Display Settings
- split = layout.split()
- col = split.column()
- col.label(text="Show:")
+ layout.label(text="Display")
+
+ col = layout.column()
col.prop(mps, "show_frame_numbers", text="Frame Numbers")
if mpath is not None:
col.prop(mpath, "lines", text="Lines")
col.prop(mpath, "line_thickness", text="Thickness")
- col = split.column()
- col.label("")
col.prop(mps, "show_keyframe_highlight", text="Keyframes")
sub = col.column()
sub.enabled = mps.show_keyframe_highlight
@@ -101,11 +98,11 @@ class MotionPathButtonsPanel:
# Customize path
if mpath is not None:
- row = layout.row(align=True)
- row.prop(mpath, "use_custom_color", text="", toggle=True, icon='COLOR')
- sub = row.row(align=True)
+
+ col.prop(mpath, "use_custom_color", text="Custom Color")
+ sub = col.column()
sub.enabled = mpath.use_custom_color
- sub.prop(mpath, "color", text="")
+ sub.prop(mpath, "color")
# FIXME: this panel still needs to be ported so that it will work correctly with animviz
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 369772f7258..75cdd2d68c6 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -23,6 +23,7 @@ from rna_prop_ui import PropertyPanel
from bpy.app.translations import pgettext_iface as iface_
from bpy_extras.node_utils import find_node_input, find_output_node
+
class MATERIAL_MT_specials(Menu):
bl_label = "Material Specials"
@@ -172,6 +173,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
if mat.use_nodes:
panel_node_draw(layout, mat.node_tree, ('OUTPUT_EEVEE_MATERIAL', 'OUTPUT_MATERIAL'))
else:
+ layout.use_property_split = True
layout.prop(mat, "diffuse_color", text="Base Color")
layout.prop(mat, "metallic")
layout.prop(mat, "specular_intensity", text="Specular")
@@ -190,6 +192,7 @@ class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
mat = context.material
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index f470a81dca1..1b1ce9d44a9 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -255,56 +255,59 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
psys = context.particle_system
part = particle_get_settings(context)
+ layout.use_property_split = True
+
layout.enabled = particle_panel_enabled(context, psys) and (psys is None or not psys.has_multiple_caches)
- row = layout.row()
- row.active = part.emit_from == 'VERT' or part.distribution != 'GRID'
- row.prop(part, "count")
+ col = layout.column()
+ col.active = part.emit_from == 'VERT' or part.distribution != 'GRID'
+ col.prop(part, "count")
if part.type == 'HAIR':
- row.prop(part, "hair_length")
+ col.prop(part, "hair_length")
if not part.use_advanced_hair:
row = layout.row()
- row.prop(part, "use_modifier_stack")
+ col.prop(part, "use_modifier_stack")
return
if part.type != 'HAIR':
- split = layout.split()
- col = split.column(align=True)
- col.prop(part, "frame_start")
- col.prop(part, "frame_end")
+ col = layout.column()
+
+ sub = col.column(align=True)
+ sub.prop(part, "frame_start", text="Frame Start")
+ sub.prop(part, "frame_end", text="End")
- col = split.column(align=True)
col.prop(part, "lifetime")
- col.prop(part, "lifetime_random", slider=True)
+ col.prop(part, "lifetime_random", slider=True, text="Lifetime Randomness")
- layout.label(text="Emit From:")
- layout.row().prop(part, "emit_from", expand=True)
+ col.separator()
+ layout.label(text="Source")
+
+ col = layout.column()
+ col.prop(part, "emit_from")
+ col.prop(part, "use_modifier_stack")
+ if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
+ col.prop(part, "distribution")
- row = layout.row()
if part.emit_from == 'VERT':
- row.prop(part, "use_emit_random")
+ col.prop(part, "use_emit_random", text="Random Order")
elif part.distribution == 'GRID':
- row.prop(part, "invert_grid")
- row.prop(part, "hexagonal_grid")
+ col.label(text="Grid")
+ col.prop(part, "invert_grid")
+ col.prop(part, "hexagonal_grid")
else:
- row.prop(part, "use_emit_random")
- row.prop(part, "use_even_distribution")
+ col.prop(part, "use_emit_random")
+ col.prop(part, "use_even_distribution")
if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
- layout.row().prop(part, "distribution", expand=True)
- row = layout.row()
if part.distribution == 'JIT':
- row.prop(part, "userjit", text="Particles/Face")
- row.prop(part, "jitter_factor", text="Jittering Amount", slider=True)
+ col.prop(part, "userjit", text="Particles/Face")
+ col.prop(part, "jitter_factor", text="Jittering Amount", slider=True)
elif part.distribution == 'GRID':
- row.prop(part, "grid_resolution")
- row.prop(part, "grid_random", text="Random", slider=True)
-
- row = layout.row()
- row.prop(part, "use_modifier_stack")
+ col.prop(part, "grid_resolution")
+ col.prop(part, "grid_random", text="Random", slider=True)
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
@@ -345,44 +348,44 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
row.operator("particle.hair_dynamics_preset_add", text="", icon='ZOOMIN')
row.operator("particle.hair_dynamics_preset_add", text="", icon='ZOOMOUT').remove_active = True
- split = layout.column()
+ layout.use_property_split = True
- col = split.column()
+ layout.separator()
+
+ col = layout.column()
col.label(text="Structure")
col.prop(cloth, "mass")
sub = col.column(align=True)
- subsub = sub.row(align=True)
- subsub.prop(cloth, "bending_stiffness", text="Stiffness")
- subsub.prop(psys.settings, "bending_random", text="Random")
- sub.prop(cloth, "bending_damping", text="Damping")
+ sub.prop(cloth, "bending_stiffness", text="Stiffness")
+ sub.prop(psys.settings, "bending_random", text="Random")
+ col.prop(cloth, "bending_damping", text="Damping")
# XXX has no noticeable effect with stiff hair structure springs
#col.prop(cloth, "spring_damping", text="Damping")
- split.separator()
+ layout.separator()
- col = split.column()
+ col = layout.column()
col.label(text="Volume")
col.prop(cloth, "air_damping", text="Air Drag")
col.prop(cloth, "internal_friction", slider=True)
+
sub = col.column(align=True)
sub.prop(cloth, "density_target", text="Density Target")
- sub.prop(cloth, "density_strength", slider=True, text="Strength")
+ sub.prop(cloth, "density_strength", slider=True, text="Density Strength")
col.prop(cloth, "voxel_cell_size")
- split.separator()
+ layout.separator()
- col = split.column()
+ col = layout.column()
col.label(text="Pinning")
col.prop(cloth, "pin_stiffness", text="Goal Strength")
- split.separator()
+ layout.separator()
- col = split.column()
- col.label(text="Quality:")
+ col = layout.column()
+ col.label(text="Quality")
col.prop(cloth, "quality", text="Steps", slider=True)
-
- row = col.row()
- row.prop(psys.settings, "show_hair_grid", text="HairGrid")
+ col.prop(psys.settings, "show_hair_grid", text="Display Hair Grid")
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list