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
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-01-18 12:25:37 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-01-18 12:25:37 +0300
commitfb97780fdf4d6cd6b8ad0cdbc6582ae235be121c (patch)
tree9f74efdc0e97f5ebd7f07a0128a1db034f027d4a /source/blender/blenkernel/intern/particle_system.c
parente6027018fef05dabe89983c6954a3a943604ed70 (diff)
Bug fix: particle dynamics were being calculated if point cache was only half baked (reported by Michael Fox in #blendercoders)
* When a simulation is baked no dynamics calculations should happen anymore (even outside of baked frame range) since these can be very time consuming and baked simulations are supposed to be fast!
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 06056e0ecc9..6ec08e76606 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -3854,14 +3854,15 @@ static void system_step(ParticleSimulationData *sim, float cfra)
return;
}
+ /* Cache is supposed to be baked, but no data was found so bail out */
+ else if(cache->flag & PTCACHE_BAKED) {
+ psys_reset(psys, PSYS_RESET_CACHE_MISS);
+ return;
+ }
else if(cache_result == PTCACHE_READ_OLD) {
psys->cfra = (float)cache->simframe;
cached_step(sim, psys->cfra);
}
- else if(cfra != startframe && ( /*sim->ob->id.lib ||*/ (cache->flag & PTCACHE_BAKED))) { /* 2.4x disabled lib, but this can be used in some cases, testing further - campbell */
- psys_reset(psys, PSYS_RESET_CACHE_MISS);
- return;
- }
/* if on second frame, write cache for first frame */
if(psys->cfra == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0))