Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-13 08:14:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-13 08:14:35 +0400
commit2d1a05874b46d31ee3598ec786a77b45512d99e1 (patch)
treef0c453f231b52b5898911f77365d908145da8460 /source/blender/blenkernel/intern/particle_system.c
parent7be1cd733dfe064d1976b706610c39f97e536b90 (diff)
parent399ad54204ad9c3bc9dbd15ec4840824d224dc0c (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.c15
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)) {