[Bf-blender-cvs] [7692bf0] master: UI: Fix Cloth panel after 28936a415076, was too large and looked bad.

Thomas Dinges noreply at git.blender.org
Thu Feb 6 21:46:14 CET 2014


Commit: 7692bf02e056f0a0d88e331461d6a9c815c43ec5
Author: Thomas Dinges
Date:   Thu Feb 6 21:45:43 2014 +0100
https://developer.blender.org/rB7692bf02e056f0a0d88e331461d6a9c815c43ec5

UI: Fix Cloth panel after 28936a415076, was too large and looked bad.

* Move Sewing Springs to a dedicated panel, the "Cloth" panel is too crowded already, and the sewing springs feature is nicely isolated.

===================================================================

M	release/scripts/startup/bl_ui/properties_physics_cloth.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 4e382f2..327ee40 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -77,16 +77,6 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
         col.prop(cloth, "structural_stiffness", text="Structural")
         col.prop(cloth, "bending_stiffness", text="Bending")
 
-        col.label(text="Sewing:")
-        col.prop(cloth, "use_sewing_springs", text="Use Sewing Springs")
-        col.prop(cloth, "sewing_force_max", text="Sewing Force")
-
-        sub = col.column()
-        col.label(text="Shrinking:")
-        col.prop_search(cloth, "vertex_group_shrink", ob, "vertex_groups", text="")
-        col.prop(cloth, "shrink_min", text="Min")
-        col.prop(cloth, "shrink_max", text="Max")
-
         col = split.column()
 
         col.label(text="Damping:")
@@ -201,6 +191,39 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
         col.prop(cloth, "bending_stiffness_max", text="Max")
 
 
+class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
+    bl_label = "Cloth Sewing Springs"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    def draw_header(self, context):
+        cloth = context.cloth.settings
+
+        self.layout.active = cloth_panel_enabled(context.cloth)
+        self.layout.prop(cloth, "use_sewing_springs", text="")
+
+    def draw(self, context):
+        layout = self.layout
+
+        md = context.cloth
+        ob = context.object
+        cloth = context.cloth.settings
+
+        layout.active = (cloth.use_sewing_springs and cloth_panel_enabled(md))
+
+        layout.prop(cloth, "sewing_force_max", text="Sewing Force")
+
+        split = layout.split()
+
+        col = split.column(align=True)
+        col.label(text="Shrinking:")
+        col.prop_search(cloth, "vertex_group_shrink", ob, "vertex_groups", text="")
+
+        col = split.column(align=True)
+        col.label()
+        col.prop(cloth, "shrink_min", text="Min")
+        col.prop(cloth, "shrink_max", text="Max")
+
+
 class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Field Weights"
     bl_options = {'DEFAULT_CLOSED'}




More information about the Bf-blender-cvs mailing list