diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a4856944d8a..77e256f1435 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2878,6 +2878,16 @@ static void direct_link_material(FileData *fd, Material *ma) static void direct_link_pointcache(FileData *fd, PointCache *cache) { + if((cache->flag & PTCACHE_DISK_CACHE)==0) { + PTCacheMem *pm; + + link_list(fd, &cache->mem_cache); + + pm = cache->mem_cache.first; + + for(; pm; pm=pm->next) + pm->data = newdataadr(fd, pm->data); + } cache->flag &= ~(PTCACHE_SIMULATION_VALID|PTCACHE_BAKE_EDIT_ACTIVE); cache->simframe= 0; } @@ -8996,6 +9006,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) Scene *sce; Tex *tx; ParticleSettings *part; + Object *ob; for(screen= main->screen.first; screen; screen= screen->id.next) { do_versions_windowmanager_2_50(screen); @@ -9038,7 +9049,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES; } - /* particle settings conversion */ + /* particle draw and render types */ for(part= main->particle.first; part; part= part->id.next) { if(part->draw_as) { if(part->draw_as == PART_DRAW_DOT) { @@ -9054,6 +9065,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + /* set old pointcaches to have disk cache flag */ + for(ob = main->object.first; ob; ob= ob->id.next) { + ParticleSystem *psys = ob->particlesystem.first; + + for(; psys; psys=psys->next) { + if(psys->pointcache) + psys->pointcache->flag |= PTCACHE_DISK_CACHE; + } + + /* TODO: softbody & cloth caches */ + } } /* TODO: should be moved into one of the version blocks once this branch moves to trunk and we can |