Fix for: [#18354] Controlling with a texture the particles DENSITY parameter doesn...
authorJanne Karhu <jhkarh@gmail.com>
Mon, 6 Apr 2009 19:32:23 +0000 (19:32 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Mon, 6 Apr 2009 19:32:23 +0000 (19:32 +0000)
If the density texture was taken into account with hair parent particles there were cases when there weren't any parents left to interpolate children from. Now a density texture is only taken into account for hair child particles.

source/blender/blenkernel/intern/particle_system.c

index 8720edf6c24bbd851f64025a5b9dc3a84ba8aa9f..0ffdd11c37ac5391643e6232e77497967c1f3ed3 100644 (file)
@@ -1616,7 +1616,7 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps
 
        NormalQuat(pa->r_rot);
 
-       if(part->distr!=PART_DISTR_GRID && part->from != PART_FROM_VERT){
+       if(part->type!=PART_HAIR && part->distr!=PART_DISTR_GRID && part->from != PART_FROM_VERT){
                /* any unique random number will do (r_ave[0]) */
                if(ptex.exist < 0.5*(1.0+pa->r_ave[0]))
                        pa->flag |= PARS_UNEXIST;