Commit: 3fb5d20cc018db73ae92f7213ff40ef2cb361613
Author: Luca Rood
Date:   Fri Jan 6 20:49:20 2017 -0200
Branches: cloth-improvements
https://developer.blender.org/rB3fb5d20cc018db73ae92f7213ff40ef2cb361613

UI Cleanup: Reorganize main cloth panel and improve tool-tips

Also removed the "vel_damping" option from the UI, because it sucks,
and nobody shall ever use, or speak of it again. (though I left its
implementation and RNA definition, for historic reasons perhaps?)

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

M       release/scripts/startup/bl_ui/properties_physics_cloth.py
M       source/blender/makesrna/intern/rna_cloth.c
M       source/blender/physics/intern/BPH_mass_spring.cpp

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

diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py 
b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 09f13b9a03..0254db8e94 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -62,7 +62,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
 
         layout.active = cloth_panel_enabled(md)
 
-        split = layout.split(percentage=0.25)
+        split = layout.split(percentage=0.3)
 
         split.label(text="Presets:")
         sub = split.row(align=True)
@@ -70,42 +70,83 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
         sub.operator("cloth.preset_add", text="", icon='ZOOMIN')
         sub.operator("cloth.preset_add", text="", 
icon='ZOOMOUT').remove_active = True
 
-        split = layout.split(percentage=0.25)
+        col = layout.column()
 
+        split = col.split(percentage=0.3)
         split.label(text="Quality:")
         split.prop(cloth, "quality", text="Steps")
 
-        split = layout.split(percentage=0.25)
-
+        split = col.split(percentage=0.3)
         split.label(text="Speed:")
         split.prop(cloth, "time_scale", text="Multiplier")
 
-        split = layout.split()
+        layout.separator()
 
-        col = split.column()
+        layout.label("Material Properties:")
 
-        col.label(text="Material:")
-        col.prop(cloth, "mass")
-        col.prop(cloth, "tension_stiffness", text="Tension")
-        col.prop(cloth, "compression_stiffness", text="Compression")
-        col.prop(cloth, "shear_stiffness", text="Shear")
-        col.prop(cloth, "bending_stiffness", text="Bending")
+        col = layout.column()
 
-        col = split.column()
+        split = col.split(percentage=0.3)
+        split.label("Mass:")
+        split.prop(cloth, "mass", text="")
+
+        split = col.split(percentage=0.3)
+        split.label("Air Viscosity:")
+        split.prop(cloth, "air_damping", text="")
+
+        col = layout.column()
+
+        split = col.split(percentage=0.3)
+        split.separator()
+
+        row = split.row(align=True)
+        row.label("Stiffness:")
+        row.label("Damping:")
+
+        split = col.split(percentage=0.3)
+        split.label("Tension:")
+        row = split.row(align=True)
+        row.prop(cloth, "tension_stiffness", text="")
+        row.prop(cloth, "tension_damping", text="")
+
+        split = col.split(percentage=0.3)
+        split.label("Compression:")
+        row = split.row(align=True)
+        row.prop(cloth, "compression_stiffness", text="")
+        row.prop(cloth, "compression_damping", text="")
+
+        split = col.split(percentage=0.3)
+        split.label("Shear:")
+        row = split.row(align=True)
+        row.prop(cloth, "shear_stiffness", text="")
+        row.prop(cloth, "shear_damping", text="")
+
+        split = col.split(percentage=0.3)
+        split.label("Bending:")
+        row = split.row(align=True)
+        row.prop(cloth, "bending_stiffness", text="")
+        row.prop(cloth, "bending_damping", text="")
+
+        split = col.split(percentage=0.3)
+        split.separator()
+
+        row = split.row(align=True)
+        row.label("Plasticity:")
+        row.label("Threshold:")
+
+        split = col.split(percentage=0.3)
+        split.label("Structural:")
+        row = split.row(align=True)
+        row.prop(cloth, "structural_plasticity", text="")
+        row.prop(cloth, "structural_yield_factor", text="")
+
+        split = col.split(percentage=0.3)
+        split.label("Bending:")
+        row = split.row(align=True)
+        row.prop(cloth, "bending_plasticity", text="")
+        row.prop(cloth, "bending_yield_factor", text="")
 
-        col.label(text="Damping:")
-        col.prop(cloth, "tension_damping", text="Tension")
-        col.prop(cloth, "compression_damping", text="Compression")
-        col.prop(cloth, "shear_damping", text="Shear")
-        col.prop(cloth, "bending_damping", text="Bending")
-        col.prop(cloth, "air_damping", text="Air")
-        col.prop(cloth, "vel_damping", text="Velocity")
-
-        layout.prop(cloth, "structural_plasticity")
-        layout.prop(cloth, "structural_yield_factor")
-        layout.prop(cloth, "bending_plasticity")
-        layout.prop(cloth, "bending_yield_factor")
-        layout.prop(cloth, "rest_planarity_factor")
+        layout.separator()
 
         split = layout.split()
 
diff --git a/source/blender/makesrna/intern/rna_cloth.c 
b/source/blender/makesrna/intern/rna_cloth.c
index 84bd375e48..ffc713454f 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -31,6 +31,8 @@
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_math_base.h"
+
 #include "RNA_define.h"
 
 #include "rna_internal.h"
@@ -575,29 +577,26 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
        prop = RNA_def_property(srna, "tension_damping", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "tension_damp");
        RNA_def_property_range(prop, 0.0f, 50.0f);
-       RNA_def_property_ui_text(prop, "Tension Spring Damping",
-                                "Damping of cloth velocity (higher = more 
smooth, less jiggling)");
+       RNA_def_property_ui_text(prop, "Tension Spring Damping", "Amount of 
damping in stretching behavior");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
        
        prop = RNA_def_property(srna, "compression_damping", PROP_FLOAT, 
PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "compression_damp");
        RNA_def_property_range(prop, 0.0f, 50.0f);
-       RNA_def_property_ui_text(prop, "Compression Spring Damping",
-                                "Damping of cloth velocity (higher = more 
smooth, less jiggling)");
+       RNA_def_property_ui_text(prop, "Compression Spring Damping", "Amount of 
damping in compression behavior");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
        prop = RNA_def_property(srna, "shear_damping", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "shear_damp");
        RNA_def_property_range(prop, 0.0f, 50.0f);
-       RNA_def_property_ui_text(prop, "Shear Spring Damping",
-                                "Damping of cloth velocity (higher = more 
smooth, less jiggling)");
+       RNA_def_property_ui_text(prop, "Shear Spring Damping", "Amount of 
damping in shearing behavior");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
        
        prop = RNA_def_property(srna, "tension_stiffness", PROP_FLOAT, 
PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "tension");
        RNA_def_property_range(prop, 0.0f, 10000.0f);
        RNA_def_property_float_funcs(prop, NULL, 
"rna_ClothSettings_tension_set", NULL);
-       RNA_def_property_ui_text(prop, "Tension Stiffness", "Tension stiffness 
of structure");
+       RNA_def_property_ui_text(prop, "Tension Stiffness", "How much the 
material resists stretching");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
        prop = RNA_def_property(srna, "tension_stiffness_max", PROP_FLOAT, 
PROP_NONE);
@@ -611,7 +610,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
        RNA_def_property_float_sdna(prop, NULL, "compression");
        RNA_def_property_range(prop, 0.0f, 10000.0f);
        RNA_def_property_float_funcs(prop, NULL, 
"rna_ClothSettings_compression_set", NULL);
-       RNA_def_property_ui_text(prop, "Compression Stiffness", "Compression 
stiffness of structure");
+       RNA_def_property_ui_text(prop, "Compression Stiffness", "How much the 
material resists compression");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
        prop = RNA_def_property(srna, "compression_stiffness_max", PROP_FLOAT, 
PROP_NONE);
@@ -625,7 +624,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
        RNA_def_property_float_sdna(prop, NULL, "shear");
        RNA_def_property_range(prop, 0.0f, 10000.0f);
        RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_shear_set", 
NULL);
-       RNA_def_property_ui_text(prop, "Shear Stiffness", "Shear spring 
stiffness");
+       RNA_def_property_ui_text(prop, "Shear Stiffness", "How much the 
material resists shearing");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
        prop = RNA_def_property(srna, "shear_stiffness_max", PROP_FLOAT, 
PROP_NONE);
@@ -638,26 +637,26 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
        prop = RNA_def_property(srna, "structural_plasticity", PROP_FLOAT, 
PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "struct_plasticity");
        RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Structural Plasticity", "How much cloth 
should retain in plane deformations after reaching yield point");
+       RNA_def_property_ui_text(prop, "Structural Plasticity", "Rate at which 
the material should retain in-plane deformations");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
        prop = RNA_def_property(srna, "structural_yield_factor", PROP_FLOAT, 
PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "struct_yield_fact");
        RNA_def_property_range(prop, 1.0f, 100.0f);
        RNA_def_property_ui_range(prop, 1.0f, 2.0f, 10, 3);
-       RNA_def_property_ui_text(prop, "Structural Yield Factor", "How much 
cloth has to deform in plane before plasticity takes effect");
+       RNA_def_property_ui_text(prop, "Structural Yield Factor", "How much 
cloth has to deform in-plane before plasticity takes effect (factor of rest 
state)");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
        prop = RNA_def_property(srna, "bending_plasticity", PROP_FLOAT, 
PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "bend_plasticity");
        RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Bending Plasticity", "How much cloth 
should retain bending deformations after reaching yield point");
+       RNA_def_property_ui_text(prop, "Bending Plasticity", "Rate at which the 
material should retain out-of-plane deformations");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
-       prop = RNA_def_property(srna, "bending_yield_factor", PROP_FLOAT, 
PROP_NONE);
+       prop = RNA_def_property(srna, "bending_yield_factor", PROP_FLOAT, 
PROP_ANGLE);
        RNA_def_property_float_sdna(prop, NULL, "bend_yield_fact");
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Bending Yield Factor", "How much cloth

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to