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

Lukas Tönne noreply at git.blender.org
Fri Nov 21 16:02:28 CET 2014


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

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 f295b94..2e1cd13 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -336,7 +336,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