diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-01-23 00:13:29 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-01-23 00:13:29 +0300 |
commit | 3dc1c14a137c390f418897131367d8b5677b013c (patch) | |
tree | fa980597ba43bca72eb01b3571dbd5f19b704cc4 /source/blender/blenloader | |
parent | f4598728c409cdbee77f842f581b435bc527959c (diff) |
Bug fix: pre 2.5 particles that were using old memory caching didn't load properly
* Now the old cache is just freed so that new calculations can be done.
* The particle dynamics regression test files should display correctly now.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e1d6c9fc48b..6fa70b0a9c2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8867,9 +8867,13 @@ static void do_versions(FileData *fd, Library *lib, Main *main) ob->soft->pointcache= BKE_ptcache_add(&ob->soft->ptcaches); for(psys=ob->particlesystem.first; psys; psys=psys->next) { - //if(psys->soft && !psys->soft->pointcache) - // psys->soft->pointcache= BKE_ptcache_add(&psys->soft->ptcaches); - if(!psys->pointcache) + if(psys->pointcache) { + if(psys->pointcache->flag & PTCACHE_BAKED && (psys->pointcache->flag & PTCACHE_DISK_CACHE)==0) { + printf("Old memory cache isn't supported for particles, so re-bake the simulation!\n"); + psys->pointcache->flag &= ~PTCACHE_BAKED; + } + } + else psys->pointcache= BKE_ptcache_add(&psys->ptcaches); } |