[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24678] trunk/blender/release/scripts/ui: * Small Layout fixes.
Thomas Dinges
dingto at gmx.de
Thu Nov 19 14:22:12 CET 2009
Revision: 24678
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24678
Author: dingto
Date: 2009-11-19 14:22:10 +0100 (Thu, 19 Nov 2009)
Log Message:
-----------
* Small Layout fixes.
* Single Layout for Softbody Panels.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_physics_common.py
trunk/blender/release/scripts/ui/properties_physics_field.py
trunk/blender/release/scripts/ui/properties_physics_softbody.py
Modified: trunk/blender/release/scripts/ui/properties_physics_common.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_common.py 2009-11-19 12:58:19 UTC (rev 24677)
+++ trunk/blender/release/scripts/ui/properties_physics_common.py 2009-11-19 13:22:10 UTC (rev 24678)
@@ -147,7 +147,7 @@
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':
Modified: trunk/blender/release/scripts/ui/properties_physics_field.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_field.py 2009-11-19 12:58:19 UTC (rev 24677)
+++ trunk/blender/release/scripts/ui/properties_physics_field.py 2009-11-19 13:22:10 UTC (rev 24678)
@@ -72,8 +72,9 @@
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 @@
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 @@
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 @@
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 @@
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()
Modified: trunk/blender/release/scripts/ui/properties_physics_softbody.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_softbody.py 2009-11-19 12:58:19 UTC (rev 24677)
+++ trunk/blender/release/scripts/ui/properties_physics_softbody.py 2009-11-19 13:22:10 UTC (rev 24678)
@@ -80,8 +80,9 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
md = context.soft_body
softbody = md.settings
+ col2 = context.region.width > narrowui
layout.active = softbody_panel_enabled(md)
@@ -244,8 +254,9 @@
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 @@
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)
More information about the Bf-blender-cvs
mailing list