diff options
author | Luca Rood <dev@lucarood.com> | 2018-08-29 01:29:37 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2018-08-31 17:33:59 +0300 |
commit | e3d31b8dfbdc3f4412e12fa1594927098ed0654d (patch) | |
tree | abc629afab10eca51ddc52a3d3550cfcc3291565 /release/scripts/startup/bl_ui/properties_physics_cloth.py | |
parent | ec3357e03ab1cf3bad48b0460a62761aae206278 (diff) |
Cloth: Componentize forces
This separates cloth stiffness and damping forces into tension,
compression, and shearing components, allowing more control over the
cloth behaviour.
This also adds a bending model selector (although the new bending model
itself is not implemented in this commit). This is because some of the
features implemented here only make sense within the new bending model,
while the old model is kept for compatibility.
This commit makes non-breaking changes, and thus maintains full
compatibility with existing simulations.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D3655
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_cloth.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_cloth.py | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index d65be4e578a..bcb0382f8c3 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -74,20 +74,38 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): col = flow.column() col.prop(cloth, "quality", text="Quality Steps") col.prop(cloth, "time_scale", text="Speed Multiplier") + col.prop(cloth, "bending_model") col.separator() col = flow.column() col.prop(cloth, "mass", text="Material Mass") - col.prop(cloth, "structural_stiffness", text="Structural") + col.prop(cloth, "air_damping", text="Air") + col.prop(cloth, "vel_damping", text="Velocity") + + col.separator() + + col = flow.column() + if cloth.bending_model == 'ANGULAR': + col.prop(cloth, "tension_stiffness", text="Stiffness Tension") + col.prop(cloth, "compression_stiffness", text="Compression") + else: + col.prop(cloth, "tension_stiffness", text="Stiffness Structural") + + col.prop(cloth, "shear_stiffness", text="Shear") col.prop(cloth, "bending_stiffness", text="Bending") col.separator() col = flow.column() - col.prop(cloth, "spring_damping", text="Damping Spring") - col.prop(cloth, "air_damping", text="Air") - col.prop(cloth, "vel_damping", text="Velocity") + if cloth.bending_model == 'ANGULAR': + col.prop(cloth, "tension_damping", text="Damping Tension") + col.prop(cloth, "compression_damping", text="Compression") + else: + col.prop(cloth, "tension_damping", text="Damping Structural") + + col.prop(cloth, "shear_damping", text="Shear") + col.prop(cloth, "bending_damping", text="Bending") col = flow.column() col.prop(cloth, "use_dynamic_mesh", text="Dynamic Mesh") @@ -248,7 +266,17 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): cloth, "vertex_group_structural_stiffness", ob, "vertex_groups", text="Structural Group" ) - col.prop(cloth, "structural_stiffness_max", text="Max") + col.prop(cloth, "tension_stiffness_max", text="Max Tension") + col.prop(cloth, "compression_stiffness_max", text="Compression") + + col.separator() + + col = flow.column() + col.prop_search( + cloth, "vertex_group_shear_stiffness", ob, "vertex_groups", + text="Shear Group" + ) + col.prop(cloth, "shear_stiffness_max", text="Max") col.separator() |