diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 3cf65330b3e..e763f234f2e 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1875,9 +1875,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } - { /* Versioning code for Subsurf modifier. */ if (!DNA_struct_elem_find(fd->filesdna, "SubsurfModifier", "short", "uv_smooth")) { for (Object *object = bmain->object.first; object != NULL; object = object->id.next) { @@ -1956,5 +1954,32 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + for (Object *ob = bmain->object.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; + + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) { + clmd->sim_parms->vgroup_mass = 0; + } + + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING)) { + clmd->sim_parms->vgroup_struct = 0; + clmd->sim_parms->vgroup_shear = 0; + clmd->sim_parms->vgroup_bend = 0; + } + + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SEW)) { + clmd->sim_parms->shrink_min = 0.0f; + clmd->sim_parms->vgroup_shrink = 0; + } + + if (!(clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED)) { + clmd->coll_parms->flags &= ~CLOTH_COLLSETTINGS_FLAG_SELF; + } + } + } + } } } |