diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-31 16:57:58 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-31 16:57:58 +0300 |
commit | 0d2b977c3b1d0c382a9ba09bead5289d387bda33 (patch) | |
tree | 180d8a8851a9796eb31134d48153f144df355335 | |
parent | 72863eb03640ee96e4e9cd38d7332c19f72ff2f5 (diff) |
Particles: Fixes for synchronization to original
Was missing synchronization of current frame to the original one,
which is one of the issues why point cache does not properly reset
on edits.
Also clear recalc flag on original particle system.
Ideally we need to get rid of recalc on a particle system, since
that is not really covered by tagging system of dependency graph.
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 9d04960e77d..458aec77379 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4365,6 +4365,9 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o psys_orig->edit->flags |= PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL; } + psys->cfra = cfra; + psys->recalc = 0; + if (DEG_is_active(depsgraph)) { if (psys_orig != psys) { if (psys_orig->edit != NULL && @@ -4374,12 +4377,11 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o psys_orig->edit->psmd_eval = psmd; } psys_orig->flag = (psys->flag & ~PSYS_SHARED_CACHES); + psys_orig->cfra = psys->cfra; + psys_orig->recalc = psys->recalc; } } - psys->cfra = cfra; - psys->recalc = 0; - /* save matrix for duplicators, at rendertime the actual dupliobject's matrix is used so don't update! */ invert_m4_m4(psys->imat, ob->obmat); |