From bd6f32559c9362197a153f1a32045af632bbe0d3 Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Mon, 28 Jul 2025 12:47:37 +0200 Subject: [PATCH] Fix #104074: Cloth simulation presets missing internal springs and pressure Pull Request: https://projects.blender.org/blender/blender/pulls/142191 --- scripts/presets/cloth/Cotton.py | 14 ++++++++++++++ scripts/presets/cloth/Denim.py | 14 ++++++++++++++ scripts/presets/cloth/Leather.py | 14 ++++++++++++++ scripts/presets/cloth/Rubber.py | 14 ++++++++++++++ scripts/presets/cloth/Silk.py | 14 ++++++++++++++ scripts/startup/bl_operators/presets.py | 14 ++++++++++++++ 6 files changed, 84 insertions(+) diff --git a/scripts/presets/cloth/Cotton.py b/scripts/presets/cloth/Cotton.py index 9e766416a75..fe0ecd6b0cb 100644 --- a/scripts/presets/cloth/Cotton.py +++ b/scripts/presets/cloth/Cotton.py @@ -9,3 +9,17 @@ bpy.context.cloth.settings.tension_damping = 5 bpy.context.cloth.settings.compression_damping = 5 bpy.context.cloth.settings.shear_damping = 5 bpy.context.cloth.settings.air_damping = 1.000 +bpy.context.cloth.settings.use_internal_springs = False +bpy.context.cloth.settings.internal_spring_max_length = 0.0 +bpy.context.cloth.settings.internal_spring_max_diversion = 45 +bpy.context.cloth.settings.internal_spring_normal_check = True +bpy.context.cloth.settings.internal_tension_stiffness = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness = 15.0 +bpy.context.cloth.settings.internal_tension_stiffness_max = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness_max = 15.0 +bpy.context.cloth.settings.use_pressure = False +bpy.context.cloth.settings.uniform_pressure_force = 76.0 +bpy.context.cloth.settings.use_pressure_volume = False +bpy.context.cloth.settings.target_volume = 0.0 +bpy.context.cloth.settings.pressure_factor = 1.0 +bpy.context.cloth.settings.fluid_density = 0.0 diff --git a/scripts/presets/cloth/Denim.py b/scripts/presets/cloth/Denim.py index 7abf4469709..845ea8018da 100644 --- a/scripts/presets/cloth/Denim.py +++ b/scripts/presets/cloth/Denim.py @@ -9,3 +9,17 @@ bpy.context.cloth.settings.tension_damping = 25 bpy.context.cloth.settings.compression_damping = 25 bpy.context.cloth.settings.shear_damping = 25 bpy.context.cloth.settings.air_damping = 1 +bpy.context.cloth.settings.use_internal_springs = False +bpy.context.cloth.settings.internal_spring_max_length = 0.0 +bpy.context.cloth.settings.internal_spring_max_diversion = 45 +bpy.context.cloth.settings.internal_spring_normal_check = True +bpy.context.cloth.settings.internal_tension_stiffness = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness = 15.0 +bpy.context.cloth.settings.internal_tension_stiffness_max = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness_max = 15.0 +bpy.context.cloth.settings.use_pressure = False +bpy.context.cloth.settings.uniform_pressure_force = 76.0 +bpy.context.cloth.settings.use_pressure_volume = False +bpy.context.cloth.settings.target_volume = 0.0 +bpy.context.cloth.settings.pressure_factor = 1.0 +bpy.context.cloth.settings.fluid_density = 0.0 diff --git a/scripts/presets/cloth/Leather.py b/scripts/presets/cloth/Leather.py index 8ba9ff7dabe..771d0c04895 100644 --- a/scripts/presets/cloth/Leather.py +++ b/scripts/presets/cloth/Leather.py @@ -9,3 +9,17 @@ bpy.context.cloth.settings.tension_damping = 25 bpy.context.cloth.settings.compression_damping = 25 bpy.context.cloth.settings.shear_damping = 25 bpy.context.cloth.settings.air_damping = 1 +bpy.context.cloth.settings.use_internal_springs = False +bpy.context.cloth.settings.internal_spring_max_length = 0.0 +bpy.context.cloth.settings.internal_spring_max_diversion = 0.0 +bpy.context.cloth.settings.internal_spring_normal_check = True +bpy.context.cloth.settings.internal_tension_stiffness = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness = 15.0 +bpy.context.cloth.settings.internal_tension_stiffness_max = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness_max = 15.0 +bpy.context.cloth.settings.use_pressure = False +bpy.context.cloth.settings.uniform_pressure_force = 76.0 +bpy.context.cloth.settings.use_pressure_volume = False +bpy.context.cloth.settings.target_volume = 0.0 +bpy.context.cloth.settings.pressure_factor = 1.0 +bpy.context.cloth.settings.fluid_density = 0.0 diff --git a/scripts/presets/cloth/Rubber.py b/scripts/presets/cloth/Rubber.py index 0d791fab2a9..284629ad46c 100644 --- a/scripts/presets/cloth/Rubber.py +++ b/scripts/presets/cloth/Rubber.py @@ -9,3 +9,17 @@ bpy.context.cloth.settings.tension_damping = 25 bpy.context.cloth.settings.compression_damping = 25 bpy.context.cloth.settings.shear_damping = 25 bpy.context.cloth.settings.air_damping = 1 +bpy.context.cloth.settings.use_internal_springs = False +bpy.context.cloth.settings.internal_spring_max_length = 0.0 +bpy.context.cloth.settings.internal_spring_max_diversion = 45 +bpy.context.cloth.settings.internal_spring_normal_check = True +bpy.context.cloth.settings.internal_tension_stiffness = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness = 15.0 +bpy.context.cloth.settings.internal_tension_stiffness_max = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness_max = 15.0 +bpy.context.cloth.settings.use_pressure = False +bpy.context.cloth.settings.uniform_pressure_force = 76.0 +bpy.context.cloth.settings.use_pressure_volume = False +bpy.context.cloth.settings.target_volume = 0.0 +bpy.context.cloth.settings.pressure_factor = 1.0 +bpy.context.cloth.settings.fluid_density = 0.0 diff --git a/scripts/presets/cloth/Silk.py b/scripts/presets/cloth/Silk.py index af867cf9c60..c997bfecc8d 100644 --- a/scripts/presets/cloth/Silk.py +++ b/scripts/presets/cloth/Silk.py @@ -9,3 +9,17 @@ bpy.context.cloth.settings.tension_damping = 0 bpy.context.cloth.settings.compression_damping = 0 bpy.context.cloth.settings.shear_damping = 0 bpy.context.cloth.settings.air_damping = 1 +bpy.context.cloth.settings.use_internal_springs = False +bpy.context.cloth.settings.internal_spring_max_length = 0.0 +bpy.context.cloth.settings.internal_spring_max_diversion = 45 +bpy.context.cloth.settings.internal_spring_normal_check = True +bpy.context.cloth.settings.internal_tension_stiffness = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness = 15.0 +bpy.context.cloth.settings.internal_tension_stiffness_max = 15.0 +bpy.context.cloth.settings.internal_compression_stiffness_max = 15.0 +bpy.context.cloth.settings.use_pressure = False +bpy.context.cloth.settings.uniform_pressure_force = 76.0 +bpy.context.cloth.settings.use_pressure_volume = False +bpy.context.cloth.settings.target_volume = 0.0 +bpy.context.cloth.settings.pressure_factor = 1.0 +bpy.context.cloth.settings.fluid_density = 0.0 diff --git a/scripts/startup/bl_operators/presets.py b/scripts/startup/bl_operators/presets.py index cc8aaab75ea..29f5bc5aa4a 100644 --- a/scripts/startup/bl_operators/presets.py +++ b/scripts/startup/bl_operators/presets.py @@ -412,6 +412,20 @@ class AddPresetCloth(AddPresetBase, Operator): "cloth.settings.compression_damping", "cloth.settings.shear_damping", "cloth.settings.bending_damping", + "cloth.settings.use_internal_springs", + "cloth.settings.internal_spring_max_length", + "cloth.settings.internal_spring_max_diversion", + "cloth.settings.internal_spring_normal_check", + "cloth.settings.internal_tension_stiffness", + "cloth.settings.internal_compression_stiffness", + "cloth.settings.internal_tension_stiffness_max", + "cloth.settings.internal_compression_stiffness_max", + "cloth.settings.use_pressure", + "cloth.settings.uniform_pressure_force", + "cloth.settings.use_pressure_volume", + "cloth.settings.target_volume", + "cloth.settings.pressure_factor", + "cloth.settings.fluid_density", ] preset_subdir = "cloth"