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.
This commit is contained in:
parent
5dba0b68f8
commit
c4a783bdf7
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue