* Small Layout fixes.
authorThomas Dinges <blender@dingto.org>
Thu, 19 Nov 2009 13:22:10 +0000 (13:22 +0000)
committerThomas Dinges <blender@dingto.org>
Thu, 19 Nov 2009 13:22:10 +0000 (13:22 +0000)
* Single Layout for Softbody Panels.

release/scripts/ui/properties_physics_common.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_physics_softbody.py

index b834f5cb2fb06ab8e0fe323a699fd946d8c275d8..2c04ff0c7c19d2934193d04f8e2919b4868e5632 100644 (file)
@@ -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':
index e3f9ce9a1f057fa15cd486ebdf56ec60ebbb9bf7..9e1146d4b5240f3fecadb2a5b3d072ff2ae4a590 100644 (file)
@@ -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()
index 115343eac2a373ff64dd433f963f92ea62d0d1e7..2675b3ed9fbeed665b4b85c41c91d623c19997eb 100644 (file)
@@ -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)