forked from bartvdbraak/blender
* Small Layout fixes.
* Single Layout for Softbody Panels.
This commit is contained in:
parent
d3600a92dc
commit
08a7bbeae5
@ -147,7 +147,7 @@ def basic_force_field_settings_ui(self, context, field):
|
||||
|
||||
if field.type == 'TURBULENCE':
|
||||
col.itemR(field, "size")
|
||||
col.itemR(field, "col")
|
||||
col.itemR(field, "flow")
|
||||
elif field.type == 'HARMONIC':
|
||||
col.itemR(field, "harmonic_damping", text="Damping")
|
||||
elif field.type == 'VORTEX' and field.shape != 'POINT':
|
||||
|
@ -72,8 +72,9 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
|
||||
col.itemR(field, "guide_free")
|
||||
col.itemR(field, "falloff_power")
|
||||
col.itemR(field, "guide_path_add")
|
||||
|
||||
col = split.column()
|
||||
|
||||
if col2:
|
||||
col = split.column()
|
||||
col.itemL(text="Clumping:")
|
||||
col.itemR(field, "guide_clump_amount")
|
||||
col.itemR(field, "guide_clump_shape")
|
||||
@ -90,10 +91,15 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
|
||||
if (field.guide_kink_type != 'NONE'):
|
||||
layout.itemR(field, "guide_kink_axis")
|
||||
|
||||
flow = layout.column_flow()
|
||||
flow.itemR(field, "guide_kink_frequency")
|
||||
flow.itemR(field, "guide_kink_shape")
|
||||
flow.itemR(field, "guide_kink_amplitude")
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
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':
|
||||
col = split.column()
|
||||
@ -101,8 +107,9 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
|
||||
col.itemR(field, "texture", text="")
|
||||
col.itemR(field, "texture_mode", text="")
|
||||
col.itemR(field, "texture_nabla")
|
||||
|
||||
col = split.column()
|
||||
|
||||
if col2:
|
||||
col = split.column()
|
||||
col.itemR(field, "use_coordinates")
|
||||
col.itemR(field, "root_coordinates")
|
||||
col.itemR(field, "force_2d")
|
||||
@ -125,8 +132,9 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
|
||||
col.itemL(text="Angular:")
|
||||
col.itemR(field, "use_radial_min", text="Use Minimum")
|
||||
col.itemR(field, "use_radial_max", text="Use Maximum")
|
||||
|
||||
col = split.column()
|
||||
|
||||
if col2:
|
||||
col = split.column()
|
||||
col.itemR(field, "radial_falloff", text="Power")
|
||||
|
||||
sub = col.column()
|
||||
@ -146,8 +154,9 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
|
||||
col.itemL(text="Radial:")
|
||||
col.itemR(field, "use_radial_min", text="Use Minimum")
|
||||
col.itemR(field, "use_radial_max", text="Use Maximum")
|
||||
|
||||
col = split.column()
|
||||
|
||||
if col2:
|
||||
col = split.column()
|
||||
col.itemR(field, "radial_falloff", text="Power")
|
||||
|
||||
sub = col.column()
|
||||
|
@ -80,8 +80,9 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
|
||||
col.itemR(softbody, "friction")
|
||||
col.itemR(softbody, "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.itemR(softbody, "speed")
|
||||
|
||||
@ -117,6 +118,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
|
||||
md = context.soft_body
|
||||
softbody = md.settings
|
||||
ob = context.object
|
||||
col2 = context.region.width > narrowui
|
||||
|
||||
layout.active = softbody.use_goal and softbody_panel_enabled(md)
|
||||
|
||||
@ -131,8 +133,9 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
|
||||
sub = col.column(align=True)
|
||||
sub.itemR(softbody, "goal_min", text="Minimum")
|
||||
sub.itemR(softbody, "goal_max", text="Maximum")
|
||||
|
||||
col = split.column()
|
||||
|
||||
if col2:
|
||||
col = split.column()
|
||||
col.itemL(text="Goal Settings:")
|
||||
col.itemR(softbody, "goal_spring", text="Stiffness")
|
||||
col.itemR(softbody, "goal_friction", text="Damping")
|
||||
@ -159,6 +162,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
|
||||
md = context.soft_body
|
||||
softbody = md.settings
|
||||
ob = context.object
|
||||
col2 = context.region.width > narrowui
|
||||
|
||||
layout.active = softbody.use_edges and softbody_panel_enabled(md)
|
||||
|
||||
@ -173,8 +177,9 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
|
||||
col.itemR(softbody, "bending")
|
||||
col.itemR(softbody, "spring_length", text="Length")
|
||||
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")
|
||||
sub = col.column()
|
||||
sub.active = softbody.stiff_quads
|
||||
@ -208,11 +213,15 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
|
||||
|
||||
md = context.soft_body
|
||||
softbody = md.settings
|
||||
col2 = context.region.width > narrowui
|
||||
|
||||
layout.active = softbody.self_collision and softbody_panel_enabled(md)
|
||||
|
||||
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.itemL(text="Ball:")
|
||||
@ -233,6 +242,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
|
||||
|
||||
md = context.soft_body
|
||||
softbody = md.settings
|
||||
col2 = context.region.width > narrowui
|
||||
|
||||
layout.active = softbody_panel_enabled(md)
|
||||
|
||||
@ -244,8 +254,9 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
|
||||
col.itemR(softbody, "minstep")
|
||||
col.itemR(softbody, "maxstep")
|
||||
col.itemR(softbody, "auto_step", text="Auto-Step")
|
||||
|
||||
col = split.column()
|
||||
|
||||
if col2:
|
||||
col = split.column()
|
||||
col.itemR(softbody, "error_limit")
|
||||
col.itemL(text="Helpers:")
|
||||
col.itemR(softbody, "choke")
|
||||
@ -265,6 +276,7 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
|
||||
def draw(self, context):
|
||||
md = context.soft_body
|
||||
softbody = md.settings
|
||||
|
||||
effector_weights_ui(self, context, softbody.effector_weights)
|
||||
|
||||
bpy.types.register(PHYSICS_PT_softbody)
|
||||
|
Loading…
Reference in New Issue
Block a user