diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-23 19:10:26 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-23 19:10:26 +0400 |
commit | 75f3ff0534221abbc1eeb59d2238e834bcb7eab6 (patch) | |
tree | 3d8c0f3fefa12919685d6df20f2cc3ff13bce55e | |
parent | 334416bdaf6b3fd4c61606fdcacf1509f03088f7 (diff) |
Fix #30298: fluid simulation from older files not working when loaded into 2.62,
this was due to a wrong version patch which leaves simulation speed to 0.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 5d21b36710c..6366b46dfa7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -13130,23 +13130,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } - if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 4)) - { - { - /* set fluidsim rate */ - Object *ob; - for (ob = main->object.first; ob; ob = ob->id.next) { - ModifierData *md; - for (md = ob->modifiers.first; md; md = md->next) { - if (md->type == eModifierType_Fluidsim) { - FluidsimSettings *fss = (FluidsimSettings *)md; - fss->animRate = 1.0f; - } - } - } - } - } - if (main->versionfile < 262) { Object *ob; @@ -13163,6 +13146,25 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 263) + { + /* set fluidsim rate. the version patch for this in 2.62 was wrong, so + try to correct it, if rate is 0.0 that's likely not intentional */ + Object *ob; + + for (ob = main->object.first; ob; ob = ob->id.next) { + ModifierData *md; + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Fluidsim) { + FluidsimModifierData *fmd = (FluidsimModifierData *)md; + if(fmd->fss->animRate == 0.0f) + fmd->fss->animRate = 1.0f; + } + } + } + } + + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */ |