From d2f3378249902cdc093c54c41afb1b48ae8357c3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 31 Jan 2019 16:53:19 +0100 Subject: Fix T59339: Particle render without baking issues The issue was caused by dependency graph resetting particles when evaluating copy-on-write version of object. Solved by only doing reset from dependency graph on user edits. Other issue was caused by modifier itself trying to compare topology and reset particles when number of vertices or faces changed. This isn't reliable, since topology might change even with same number of elements. But also, since copy-on-written object initially always have those fields zero-ed the reset was happening on every F12. The latter issue is solved by moving reset from modifier stack to places where we exit edit/paint modes which might be changing topology. There is still weird issue of particles generated at some weird location after tapping tab twice, but this is not a new issue in 2.8 branch and is to be looked separately. --- source/blender/blenkernel/BKE_particle.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_particle.h') diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index c23aa2f709c..72170da4ea2 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -418,6 +418,9 @@ typedef void (*ParticleSystemIDFunc)(struct ParticleSystem *psys, struct ID **id void BKE_particlesystem_id_loop(struct ParticleSystem *psys, ParticleSystemIDFunc func, void *userdata); +/* Reset all particle systems in the given object. */ +void BKE_particlesystem_reset_all(struct Object *object); + /* ----------- functions needed only inside particlesystem ------------ */ /* particle.c */ void psys_disable_all(struct Object *ob); -- cgit v1.2.3