From 68fb0d98d95ac73eb22b9ca0702131a058b3a632 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 1 Apr 2010 14:44:31 +0000 Subject: Smoke: * Bugfix for missing high res calculation when low res cache was already there * Bugfix for loading file with smoke but tfor the first "round" of alt-a nothing happened. Now the smoke gets calculated on file load, too. --- source/blender/blenkernel/intern/smoke.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 00e81063760..aa513ab0fb7 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -1156,10 +1156,7 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM framenr = scene->r.cfra; - // printf("time: %d\n", scene->r.cfra); - - if(framenr == smd->time) - return; + printf("time: %d\n", scene->r.cfra); cache = sds->point_cache[0]; BKE_ptcache_id_from_smoke(&pid, ob, smd); @@ -1206,11 +1203,23 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM if(cache_result_wt == PTCACHE_READ_EXACT) { BKE_ptcache_validate(cache_wt, framenr); + + return; + } + else + { + ; /* don't return in the case we only got low res cache but no high res cache */ + /* we still need to calculate the high res cache */ } } - return; + else + return; } + /* only calculate something when we advanced a frame */ + if(framenr == smd->time) + return; + tstart(); smoke_calc_domain(scene, ob, smd); -- cgit v1.2.3