[Bf-blender-cvs] [3f3c19e] master: Another fix for particle instance child lookups, was not subtracting parent amount.

Lukas Tönne noreply at git.blender.org
Tue Jan 20 09:53:07 CET 2015


Commit: 3f3c19e39142e861d8e2c492ebd902980503b620
Author: Lukas Tönne
Date:   Fri Nov 21 16:00:24 2014 +0100
Branches: master
https://developer.blender.org/rB3f3c19e39142e861d8e2c492ebd902980503b620

Another fix for particle instance child lookups, was not subtracting
parent amount.

===================================================================

M	source/blender/modifiers/intern/MOD_particleinstance.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index bf10863..f88dc78 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -334,7 +334,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
 					if (first_particle + p < psys->totpart)
 						pa = psys->particles + first_particle + p;
 					else {
-						ChildParticle *cpa = psys->child + p;
+						ChildParticle *cpa = psys->child + (p - psys->totpart);
 						pa = psys->particles + cpa->parent;
 					}
 					psys_mat_hair_to_global(sim.ob, sim.psmd->dm, sim.psys->part->from, pa, hairmat);




More information about the Bf-blender-cvs mailing list