diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-03-30 18:10:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-03-30 18:10:54 +0300 |
commit | 26132eaf1f8058d66f39a5009fa3803935e091c4 (patch) | |
tree | 1bd09e95184a1834046cf6eda20b555cfc420740 /source/blender/blenkernel/intern/particle_system.c | |
parent | 53e85a159a64a59b66d57006b5a80d3826648ef0 (diff) |
Partly fix (unreported) particles not updating correctly when changing settings.
Point-cached particles (those using simulations) would not update at all outside of
first frame, due to PSYS_RECALC_RESET flag being ingnored in `system_step()`...
For some mysterious reasons, udate is still non-fully functional outside of startframe
(e.g. changing face distribution between random and jittered), but at least when choosing
'Vertices' you get particles from verts and not faces!
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 10ca88cdeeb..1ca68f714c8 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3880,8 +3880,8 @@ static void system_step(ParticleSimulationData *sim, float cfra) BKE_ptcache_id_time(pid, sim->scene, 0.0f, &startframe, &endframe, NULL); - /* clear everythin on start frame */ - if (cfra == startframe) { + /* clear everything on start frame, or when psys needs full reset! */ + if ((cfra == startframe) || (psys->recalc & PSYS_RECALC_RESET)) { BKE_ptcache_id_reset(sim->scene, pid, PTCACHE_RESET_OUTDATED); BKE_ptcache_validate(cache, startframe); cache->flag &= ~PTCACHE_REDO_NEEDED; |