Particle edit: Restore weird-looking conditions in evaluation

They might be looking weird, but they match conditions when children particles
are to be re-calculated for particle edit.
This commit is contained in:
Sergey Sharybin
2018-05-15 11:48:33 +02:00
parent aa312621dc
commit c5f469da5e
2 changed files with 0 additions and 6 deletions

View File

@@ -2369,9 +2369,7 @@ static void cache_key_incremental_rotation(ParticleCacheKey *key0, ParticleCache
void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_render_params)
{
PARTICLE_PSMD;
#if 0
ParticleEditSettings *pset = &sim->scene->toolsettings->particle;
#endif
ParticleSystem *psys = sim->psys;
ParticleSettings *part = psys->part;
ParticleCacheKey *ca, **cache;
@@ -2403,11 +2401,9 @@ 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->depsgraph, psys))
if ((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;

View File

@@ -2945,10 +2945,8 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons
else if (psys_in_edit_mode(sim->depsgraph, psys)) {
if ((pset->flag & PE_DRAW_PART)==0)
skip = 1;
#if 0 /* TODO(mai): something is very wrong with these conditionals, they dont make sense and the cache isnt updating */
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
}
}