diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-12-09 21:10:55 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-12-09 21:18:10 +0300 |
commit | 62ef59aa0cca736b09192b67cc924180d9c2f9f9 (patch) | |
tree | f0f76383b9536a5186abe0072b1a535e587cef22 /release/scripts | |
parent | e77fdc62b75a3b96e4c3ca5c2fc4025d8091ff99 (diff) |
Add the ability to create internal springs to the cloth sim
This can be used to make closed surfaces behave more like a soft body.
Reviewed By: Jacques Lucke
Differential Revision: http://developer.blender.org/D5788
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_cloth.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index d5ac140dc98..cd7e99f255c 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -160,6 +160,46 @@ class PHYSICS_PT_cloth_damping(PhysicButtonsPanel, Panel): col = flow.column() col.prop(cloth, "bending_damping", text="Bending") +class PHYSICS_PT_cloth_internal_springs(PhysicButtonsPanel, Panel): + bl_label = "Internal Springs" + bl_parent_id = 'PHYSICS_PT_cloth_physical_properties' + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw_header(self, context): + cloth = context.cloth.settings + + self.layout.active = cloth_panel_enabled(context.cloth) + self.layout.prop(cloth, "use_internal_springs", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + cloth = context.cloth.settings + md = context.cloth + ob = context.object + + layout.active = cloth.use_internal_springs and cloth_panel_enabled(md) + + flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True) + + col = flow.column() + col.prop(cloth, "internal_spring_max_length", text="Max Spring Creation Length") + col = flow.column() + col.prop(cloth, "internal_spring_max_diversion", text="Max Creation Diversion") + col = flow.column() + col.prop(cloth, "internal_spring_normal_check", text="Check Surface Normals") + col = flow.column() + col.prop(cloth, "internal_tension_stiffness", text="Tension") + col = flow.column() + col.prop(cloth, "internal_compression_stiffness", text="Compression") + + col = flow.column() + col.prop_search(cloth, "vertex_group_intern", ob, "vertex_groups", text="Vertex Group") + col = flow.column() + col.prop(cloth, "internal_tension_stiffness_max", text="Max Tension") + col = flow.column() + col.prop(cloth, "internal_compression_stiffness_max", text="Max Compression") class PHYSICS_PT_cloth_pressure(PhysicButtonsPanel, Panel): bl_label = "Pressure" @@ -422,6 +462,7 @@ classes = ( PHYSICS_PT_cloth_physical_properties, PHYSICS_PT_cloth_stiffness, PHYSICS_PT_cloth_damping, + PHYSICS_PT_cloth_internal_springs, PHYSICS_PT_cloth_pressure, PHYSICS_PT_cloth_cache, PHYSICS_PT_cloth_shape, |