diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-11-27 16:56:16 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-11-27 17:01:15 +0300 |
commit | f6cefbef22c8c6583b4927c179dabac3eb57aa22 (patch) | |
tree | 96785e2ee93f34bb14975a53bc2a4e003ee3fb59 /source/blender/blenloader/intern | |
parent | eb798de101ac7946e2d719e763ad1f0fd3e26acd (diff) |
Fix T30941: Add cloth air pressure simulation
This adds some basic simulation of internal air pressure inside of
closed cloth mesh objects.
Reviewed By: Jacques Lucke
Differential Revision: http://developer.blender.org/D5473
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 8a3ec61bbc8..0cb68cfd7fe 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3977,5 +3977,15 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) br->pose_smooth_iterations = 4; } } + /* Cloth pressure */ + for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { + for (ModifierData *md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData *)md; + + clmd->sim_parms->pressure_factor = 1; + } + } + } } } |