[Bf-blender-cvs] [0e4df41] temp_merge_gooseberry_hair: Another fix for particle instance child lookups, was not subtracting parent amount.

Lukas Tönne noreply at git.blender.org
Mon Jan 19 20:51:21 CET 2015


Commit: 0e4df41b89b1e26b9415cb2c8d4765e5f95428da
Author: Lukas Tönne
Date:   Fri Nov 21 16:00:24 2014 +0100
Branches: temp_merge_gooseberry_hair
https://developer.blender.org/rB0e4df41b89b1e26b9415cb2c8d4765e5f95428da

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 171babd..e000f2c 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