patch by Charlie, related to recent changes of multi-uv/lightmap generation. This...
[blender-staging.git] / source / gameengine / Ketsji / KX_BlenderMaterial.cpp
index b505c9ec8dcd49622f72187cebb949930f63dbac..d8c2f2fd40c1475749a3dbd4baa1708d56ddcbb6 100644 (file)
@@ -437,7 +437,15 @@ void KX_BlenderMaterial::ActivateTexGen(RAS_IRasterizer *ras) const
 
        for(int i=0; i<mMaterial->num_enabled; i++) {
                int mode = mMaterial->mapping[i].mapping;
-               
+
+               if (mode &USECUSTOMUV)
+               {
+                       STR_String str = mMaterial->mapping[i].uvCoName;
+                       if (!str.IsEmpty())
+                               ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_UV2, i);
+                       continue;
+               }
+
                if( mode &(USEREFL|USEOBJ))
                        ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_GEN, i);
                else if(mode &USEORCO)