Fix for [#26102] Particle Texture mismapped on Multires (in some modes)
authorJanne Karhu <jhkarh@gmail.com>
Wed, 16 Feb 2011 11:38:28 +0000 (11:38 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Wed, 16 Feb 2011 11:38:28 +0000 (11:38 +0000)
* Particle modifier didn't check for particle textures using uv-coordinates properly.

source/blender/modifiers/intern/MOD_particlesystem.c

index c7638afbbcc422d7497fc34e9c2a9117ea8b7955..246a1b5391e5ee805a9b9203335e5446f7772505 100644 (file)
@@ -91,14 +91,10 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
        if(!psmd->psys->part)
                return 0;
 
-       ma= give_current_material(ob, psmd->psys->part->omat);
-       if(ma) {
-               for(i=0; i<MAX_MTEX; i++) {
-                       mtex=ma->mtex[i];
-                       if(mtex && (ma->septex & (1<<i))==0)
-                               if(mtex->pmapto && (mtex->texco & TEXCO_UV))
-                                       dataMask |= CD_MASK_MTFACE;
-               }
+       for(i=0; i<MAX_MTEX; i++) {
+               mtex = psmd->psys->part->mtex[i];
+               if(mtex && mtex->mapto && (mtex->texco & TEXCO_UV))
+                       dataMask |= CD_MASK_MTFACE;
        }
 
        if(psmd->psys->part->tanfac!=0.0)