From bba9c797b542a94d2ae1830135c77b8f56825f32 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 12 Aug 2009 17:39:11 +0000 Subject: Various fixes: - Correct fix for file loading crash introduced by earlier point cache commit. - Simulations are no longer calculated to current frame at render time automatically. * This has to be thought through more carefully at some point, perhaps through render profiles. * All simulations can be updated manually to current frame from any cache panel with the "update all to current frame" button. - Some explanatory comments added for BKE_pointcache.h. --- source/blender/blenloader/intern/readfile.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 3b53e5b32cb..4515032218e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2964,9 +2964,11 @@ static void direct_link_pointcache_list(FileData *fd, ListBase *ptcaches, PointC *ocache = newdataadr(fd, *ocache); } else if(*ocache) { - /* old "single" caches need to be linked too for do-versions */ + /* old "single" caches need to be linked too */ *ocache = newdataadr(fd, *ocache); direct_link_pointcache(fd, *ocache); + + ptcaches->first = ptcaches->last = *ocache; } } @@ -3650,7 +3652,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) clmd->sim_parms= newdataadr(fd, clmd->sim_parms); clmd->coll_parms= newdataadr(fd, clmd->coll_parms); - clmd->point_cache= newdataadr(fd, clmd->point_cache); direct_link_pointcache_list(fd, &clmd->ptcaches, &clmd->point_cache); @@ -3907,9 +3908,7 @@ static void direct_link_object(FileData *fd, Object *ob) } } - sb->pointcache= newdataadr(fd, sb->pointcache); - if(sb->pointcache) - direct_link_pointcache_list(fd, &sb->ptcaches, &sb->pointcache); + direct_link_pointcache_list(fd, &sb->ptcaches, &sb->pointcache); } ob->bsoft= newdataadr(fd, ob->bsoft); ob->fluidsimSettings= newdataadr(fd, ob->fluidsimSettings); /* NT */ -- cgit v1.2.3