From 7692bf02e056f0a0d88e331461d6a9c815c43ec5 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 6 Feb 2014 21:45:43 +0100 Subject: 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. --- .../startup/bl_ui/properties_physics_cloth.py | 43 +++++++++++++++++----- 1 file changed, 33 insertions(+), 10 deletions(-) (limited to '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 4e382f23645..327ee4035ef 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'} -- cgit v1.2.3