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!
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user