Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2010-04-01 18:44:31 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2010-04-01 18:44:31 +0400
commit68fb0d98d95ac73eb22b9ca0702131a058b3a632 (patch)
tree7d1ce450123c147eea939937ad669a115aaa8fb9 /source
parent7e776137ed962336aa7f5ae695a8df5923a5f71d (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/smoke.c19
1 files changed, 14 insertions, 5 deletions
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);