diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-25 15:58:42 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-25 16:02:31 +0300 |
commit | e198c5a175cf2c44a034d9a42e51027fe89002b8 (patch) | |
tree | cacee188ac917abb0de6eb081ff31c1dfb121fa9 /source/blender/blenkernel | |
parent | da13a3bdeea5313dcb63fca259c0fb8ed4d7ae22 (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 86d2ceddced..bed03858db8 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -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); |