diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index a254a854c66..3e6b0d34ba6 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1231,5 +1231,24 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) br->flag |= BRUSH_ACCUMULATE; } } + + if (!DNA_struct_elem_find(fd->filesdna, "ClothSimSettings", "float", "time_scale")) { + Object *ob; + ModifierData *md; + for (ob = main->object.first; ob; ob = ob->id.next) { + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData *)md; + clmd->sim_parms->time_scale = 1.0f; + } + else if (md->type == eModifierType_ParticleSystem) { + ParticleSystemModifierData *pmd = (ParticleSystemModifierData *)md; + if (pmd->psys->clmd) { + pmd->psys->clmd->sim_parms->time_scale = 1.0f; + } + } + } + } + } } } |