Fix for: [#18027] Strange behaviour of Explode modifier in combination with SubSurf
authorJanne Karhu <jhkarh@gmail.com>
Tue, 7 Apr 2009 03:00:32 +0000 (03:00 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Tue, 7 Apr 2009 03:00:32 +0000 (03:00 +0000)
- Explode didn't use the dmcache index for getting the particles emitter position.
- One "tri or quad"-comparison tested the wrong index. Leading to one quad converting into a tri.

source/blender/blenkernel/intern/modifier.c

index b3892a515af70629931003f90de1ba418cb5c9fa..d182e3124fc5b2a9790b84a00d0ba0e555210706 100644 (file)
@@ -7193,7 +7193,7 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
                        pa= pars+i;
 
                        /* get particle state */
-                       psys_particle_on_emitter(psmd,part->from,pa->num,-1,pa->fuv,pa->foffset,loc0,nor,0,0,0,0);
+                       psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc0,nor,0,0,0,0);
                        Mat4MulVecfl(ob->obmat,loc0);
 
                        state.time=cfra;
@@ -7249,7 +7249,7 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
 
                *mf = source;
 
-               test_index_face(mf, &explode->faceData, i, (mf->v4 ? 4 : 3));
+               test_index_face(mf, &explode->faceData, i, (orig_v4 ? 4 : 3));
        }
 
        MEM_printmemlist_stats();