diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-12-13 12:39:14 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-12-13 12:39:14 +0300 |
commit | 4cd06a6526ddb837d445a25c081dce75c2ece979 (patch) | |
tree | 244bb6d64c8d6f514a51f9344fff9618a9542df3 /source/blender/blenkernel | |
parent | a4b410af3d67c44a35c9cbf6f09c33a3c41a50af (diff) |
Fix for [#25185] Toggling hair dynamics without deleting cache leaves hair disattached when mesh animation is controlled by deformers - discussed with Jahka on IRC on Sat
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 374d5a20b1c..a81406f0af1 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2795,7 +2795,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) ParticleSettings *part = psys->part; ParticleCacheKey *ca, **cache= psys->pathcache; - DerivedMesh *hair_dm = psys->hair_out_dm; + DerivedMesh *hair_dm = (psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS) ? psys->hair_out_dm : NULL; ParticleKey result; @@ -2828,7 +2828,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) BLI_srandom(psys->seed); keyed = psys->flag & PSYS_KEYED; - baked = !hair_dm && psys->pointcache->mem_cache.first; + baked = psys->pointcache->mem_cache.first && psys->part->type != PART_HAIR; /* clear out old and create new empty path cache */ psys_free_path_cache(psys, psys->edit); |