Fix T45350: Cache not being recomputed with "Bake All Dynamics"

This commit is contained in:
Luca Rood 2017-04-20 14:59:02 +02:00
parent ae79eb2105
commit ee3faddfaa
Notes: blender-bot 2023-03-24 17:05:22 +01:00
Referenced by commit 0fd31c53ee, Rigidbody: Fix regression introduced in ee3fadd
Referenced by issue #45350, Cloth Simulator: "Free all bakes" doesn't clear bake, but "Free Bake" works
1 changed files with 1 additions and 3 deletions

View File

@ -3618,9 +3618,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
psys_get_pointcache_start_end(scene, pid->calldata, &cache->startframe, &cache->endframe);
}
if ((cache->flag & PTCACHE_REDO_NEEDED || (cache->flag & PTCACHE_SIMULATION_VALID)==0) &&
(render || bake))
{
if (((cache->flag & PTCACHE_BAKED) == 0) && (render || bake)) {
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
}