diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2018-02-10 10:40:41 +0300 |
---|---|---|
committer | Mai Lavelle <mai.lavelle@gmail.com> | 2018-02-15 11:26:59 +0300 |
commit | c4a783bdf78dc9af9a622f9bcbbccc1410c246a7 (patch) | |
tree | dd29878ca8712ed3dafff4642940b3206f7eb14c /source | |
parent | 5dba0b68f8ba9e9d700c75be6595fb09e6d5c5ea (diff) |
Fix lack of particles updates and disappearing particles
The conditionals in particle code are... some sort of madness... I'm not
even sure what the correct behavior should be from looking at it.
In this case the path cache generation was being skipped in edit mode.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index daab16959d1..0bc5135c960 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2590,9 +2590,11 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_re if ((psys->flag & PSYS_HAIR_DONE || psys->flag & PSYS_KEYED || psys->pointcache) == 0) return; +#if 0 /* TODO(mai): something is very wrong with these conditionals, they dont make sense and the cache isnt updating */ if (psys_in_edit_mode(sim->eval_ctx, sim->eval_ctx->view_layer, psys)) if (psys->renderdata == 0 && (psys->edit == NULL || pset->flag & PE_DRAW_PART) == 0) return; +#endif keyed = psys->flag & PSYS_KEYED; baked = psys->pointcache->mem_cache.first && psys->part->type != PART_HAIR; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index d187a009a2d..0fcc918a069 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2936,12 +2936,15 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons skip = 1; /* draw visualization */ else if (psys->pointcache->flag & PTCACHE_BAKING) skip = 1; /* no need to cache paths while baking dynamics */ + +#if 0 /* TODO(mai): something is very wrong with these conditionals, they dont make sense and the cache isnt updating */ else if (psys_in_edit_mode(sim->eval_ctx, sim->eval_ctx->view_layer, psys)) { if ((pset->flag & PE_DRAW_PART)==0) skip = 1; else if (part->childtype==0 && (psys->flag & PSYS_HAIR_DYNAMICS && psys->pointcache->flag & PTCACHE_BAKED)==0) skip = 1; /* in edit mode paths are needed for child particles and dynamic hair */ } +#endif } |