Fix crash happening with hair step
The issue was caused by the hair step checking whether particle system needs to have path cache. This was done in a way which was traversing an entire scene and was checking every object for particle instance modifier. Ideally, path cache should be an own operation in the dependency graph. Or at least, this flag should be set by dependency graph builder, similar to curve's path. Since the code was broken already (it was only checking first particle instance modifier), it is easier to remove the buggy code, solve the crash and move on for now. If this causes an issue, simply set particle system to be rendered as path. Fixes crash with playback of Spring scenes.
This commit is contained in:
@@ -2969,23 +2969,6 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* particle instance modifier with "path" option need cached paths even if particle system doesn't */
|
||||
if (skip) {
|
||||
FOREACH_SCENE_OBJECT_BEGIN(sim->scene, ob)
|
||||
{
|
||||
ModifierData *md = modifiers_findByType(ob, eModifierType_ParticleInstance);
|
||||
if (md) {
|
||||
ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md;
|
||||
if (pimd->flag & eParticleInstanceFlag_Path && pimd->ob == sim->ob && pimd->psys == (psys - (ParticleSystem*)sim->ob->particlesystem.first)) {
|
||||
skip = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
FOREACH_SCENE_OBJECT_END;
|
||||
}
|
||||
|
||||
if (!skip) {
|
||||
psys_cache_paths(sim, cfra, use_render_params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user