diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-13 08:14:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-13 08:14:35 +0400 |
commit | 2d1a05874b46d31ee3598ec786a77b45512d99e1 (patch) | |
tree | f0c453f231b52b5898911f77365d908145da8460 /source/blender/blenkernel/intern/particle_system.c | |
parent | 7be1cd733dfe064d1976b706610c39f97e536b90 (diff) | |
parent | 399ad54204ad9c3bc9dbd15ec4840824d224dc0c (diff) |
svn merge ^/trunk/blender -r44024:44076
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 75bf89fb032..9b694ccf584 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3416,6 +3416,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra) ParticleSystem *psys = sim->psys; ParticleSettings *part = psys->part; ParticleEditSettings *pset = &sim->scene->toolsettings->particle; + Base *base; int distr=0, alloc=0, skip=0; if((psys->part->childtype && psys->totchild != get_psys_tot_child(sim->scene, psys)) || psys->recalc&PSYS_RECALC_RESET) @@ -3458,6 +3459,19 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra) } } + + /* 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); + 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; + } + } + } + if(!skip) { psys_cache_paths(sim, cfra); @@ -4423,6 +4437,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys) if(psys->totpart == 0 && part->totpart == 0) { psys_free_path_cache(psys, NULL); free_hair(ob, psys, 0); + psys->flag |= PSYS_HAIR_DONE; } /* (re-)create hair */ else if(hair_needs_recalc(psys)) { |