* Small Layout fixes.

* Single Layout for Softbody Panels.
This commit is contained in:
Thomas Dinges 2009-11-19 13:22:10 +00:00
parent d3600a92dc
commit 08a7bbeae5
3 changed files with 43 additions and 22 deletions

@ -147,7 +147,7 @@ def basic_force_field_settings_ui(self, context, field):
if field.type == 'TURBULENCE': if field.type == 'TURBULENCE':
col.itemR(field, "size") col.itemR(field, "size")
col.itemR(field, "col") col.itemR(field, "flow")
elif field.type == 'HARMONIC': elif field.type == 'HARMONIC':
col.itemR(field, "harmonic_damping", text="Damping") col.itemR(field, "harmonic_damping", text="Damping")
elif field.type == 'VORTEX' and field.shape != 'POINT': elif field.type == 'VORTEX' and field.shape != 'POINT':

@ -73,7 +73,8 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
col.itemR(field, "falloff_power") col.itemR(field, "falloff_power")
col.itemR(field, "guide_path_add") col.itemR(field, "guide_path_add")
col = split.column() if col2:
col = split.column()
col.itemL(text="Clumping:") col.itemL(text="Clumping:")
col.itemR(field, "guide_clump_amount") col.itemR(field, "guide_clump_amount")
col.itemR(field, "guide_clump_shape") col.itemR(field, "guide_clump_shape")
@ -90,10 +91,15 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
if (field.guide_kink_type != 'NONE'): if (field.guide_kink_type != 'NONE'):
layout.itemR(field, "guide_kink_axis") layout.itemR(field, "guide_kink_axis")
flow = layout.column_flow() split = layout.split()
flow.itemR(field, "guide_kink_frequency")
flow.itemR(field, "guide_kink_shape") col = split.column()
flow.itemR(field, "guide_kink_amplitude") col.itemR(field, "guide_kink_frequency")
col.itemR(field, "guide_kink_shape")
if col2:
col = split.column()
col.itemR(field, "guide_kink_amplitude")
elif field.type == 'TEXTURE': elif field.type == 'TEXTURE':
col = split.column() col = split.column()
@ -102,7 +108,8 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
col.itemR(field, "texture_mode", text="") col.itemR(field, "texture_mode", text="")
col.itemR(field, "texture_nabla") col.itemR(field, "texture_nabla")
col = split.column() if col2:
col = split.column()
col.itemR(field, "use_coordinates") col.itemR(field, "use_coordinates")
col.itemR(field, "root_coordinates") col.itemR(field, "root_coordinates")
col.itemR(field, "force_2d") col.itemR(field, "force_2d")
@ -126,7 +133,8 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
col.itemR(field, "use_radial_min", text="Use Minimum") col.itemR(field, "use_radial_min", text="Use Minimum")
col.itemR(field, "use_radial_max", text="Use Maximum") col.itemR(field, "use_radial_max", text="Use Maximum")
col = split.column() if col2:
col = split.column()
col.itemR(field, "radial_falloff", text="Power") col.itemR(field, "radial_falloff", text="Power")
sub = col.column() sub = col.column()
@ -147,7 +155,8 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
col.itemR(field, "use_radial_min", text="Use Minimum") col.itemR(field, "use_radial_min", text="Use Minimum")
col.itemR(field, "use_radial_max", text="Use Maximum") col.itemR(field, "use_radial_max", text="Use Maximum")
col = split.column() if col2:
col = split.column()
col.itemR(field, "radial_falloff", text="Power") col.itemR(field, "radial_falloff", text="Power")
sub = col.column() sub = col.column()

@ -81,7 +81,8 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
col.itemR(softbody, "mass") col.itemR(softbody, "mass")
col.item_pointerR(softbody, "mass_vertex_group", ob, "vertex_groups", text="Mass:") col.item_pointerR(softbody, "mass_vertex_group", ob, "vertex_groups", text="Mass:")
col = split.column() if col2:
col = split.column()
col.itemL(text="Simulation:") col.itemL(text="Simulation:")
col.itemR(softbody, "speed") col.itemR(softbody, "speed")
@ -117,6 +118,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
md = context.soft_body md = context.soft_body
softbody = md.settings softbody = md.settings
ob = context.object ob = context.object
col2 = context.region.width > narrowui
layout.active = softbody.use_goal and softbody_panel_enabled(md) layout.active = softbody.use_goal and softbody_panel_enabled(md)
@ -132,7 +134,8 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
sub.itemR(softbody, "goal_min", text="Minimum") sub.itemR(softbody, "goal_min", text="Minimum")
sub.itemR(softbody, "goal_max", text="Maximum") sub.itemR(softbody, "goal_max", text="Maximum")
col = split.column() if col2:
col = split.column()
col.itemL(text="Goal Settings:") col.itemL(text="Goal Settings:")
col.itemR(softbody, "goal_spring", text="Stiffness") col.itemR(softbody, "goal_spring", text="Stiffness")
col.itemR(softbody, "goal_friction", text="Damping") col.itemR(softbody, "goal_friction", text="Damping")
@ -159,6 +162,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
md = context.soft_body md = context.soft_body
softbody = md.settings softbody = md.settings
ob = context.object ob = context.object
col2 = context.region.width > narrowui
layout.active = softbody.use_edges and softbody_panel_enabled(md) layout.active = softbody.use_edges and softbody_panel_enabled(md)
@ -174,7 +178,8 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
col.itemR(softbody, "spring_length", text="Length") col.itemR(softbody, "spring_length", text="Length")
col.item_pointerR(softbody, "spring_vertex_group", ob, "vertex_groups", text="Springs:") col.item_pointerR(softbody, "spring_vertex_group", ob, "vertex_groups", text="Springs:")
col = split.column() if col2:
col = split.column()
col.itemR(softbody, "stiff_quads") col.itemR(softbody, "stiff_quads")
sub = col.column() sub = col.column()
sub.active = softbody.stiff_quads sub.active = softbody.stiff_quads
@ -208,11 +213,15 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
md = context.soft_body md = context.soft_body
softbody = md.settings softbody = md.settings
col2 = context.region.width > narrowui
layout.active = softbody.self_collision and softbody_panel_enabled(md) layout.active = softbody.self_collision and softbody_panel_enabled(md)
layout.itemL(text="Collision Type:") layout.itemL(text="Collision Type:")
layout.itemR(softbody, "collision_type", expand=True) if col2:
layout.itemR(softbody, "collision_type", expand=True)
else:
layout.itemR(softbody, "collision_type", text="")
col = layout.column(align=True) col = layout.column(align=True)
col.itemL(text="Ball:") col.itemL(text="Ball:")
@ -233,6 +242,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
md = context.soft_body md = context.soft_body
softbody = md.settings softbody = md.settings
col2 = context.region.width > narrowui
layout.active = softbody_panel_enabled(md) layout.active = softbody_panel_enabled(md)
@ -245,7 +255,8 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
col.itemR(softbody, "maxstep") col.itemR(softbody, "maxstep")
col.itemR(softbody, "auto_step", text="Auto-Step") col.itemR(softbody, "auto_step", text="Auto-Step")
col = split.column() if col2:
col = split.column()
col.itemR(softbody, "error_limit") col.itemR(softbody, "error_limit")
col.itemL(text="Helpers:") col.itemL(text="Helpers:")
col.itemR(softbody, "choke") col.itemR(softbody, "choke")
@ -265,6 +276,7 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
def draw(self, context): def draw(self, context):
md = context.soft_body md = context.soft_body
softbody = md.settings softbody = md.settings
effector_weights_ui(self, context, softbody.effector_weights) effector_weights_ui(self, context, softbody.effector_weights)
bpy.types.register(PHYSICS_PT_softbody) bpy.types.register(PHYSICS_PT_softbody)