diff options
author | Luca Rood <dev@lucarood.com> | 2017-04-21 15:28:23 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-04-24 17:09:04 +0300 |
commit | 913e9350a56dc384d76a4b1cce36300764c35011 (patch) | |
tree | d9639d9f1334314f2f50e3a3747f841a06a3b093 /source/blender/blenkernel/intern/particle_system.c | |
parent | 2010dbe8a59e80775219fb5162f3c2f5dfd24e04 (diff) |
Convert BaseLegacy to Base (part)
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 4f9759742ce..c26ac056499 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -78,6 +78,7 @@ #include "BKE_particle.h" #include "BKE_global.h" +#include "BKE_collection.h" #include "BKE_DerivedMesh.h" #include "BKE_object.h" #include "BKE_material.h" @@ -2895,7 +2896,6 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons ParticleSystem *psys = sim->psys; ParticleSettings *part = psys->part; ParticleEditSettings *pset = &sim->scene->toolsettings->particle; - BaseLegacy *base; int distr=0, alloc=0, skip=0; if ((psys->part->childtype && psys->totchild != psys_get_tot_child(sim->scene, psys)) || psys->recalc&PSYS_RECALC_RESET) @@ -2940,8 +2940,9 @@ 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 */ - for (base = sim->scene->base.first; base; base= base->next) { - ModifierData *md = modifiers_findByType(base->object, eModifierType_ParticleInstance); + FOREACH_SCENE_OBJECT(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)) { @@ -2950,6 +2951,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons } } } + FOREACH_SCENE_OBJECT_END if (!skip) { psys_cache_paths(sim, cfra, use_render_params); |