BGE bug fix for new shape action: mesh with multiple materials did not deform properly
authorBenoit Bolsee <benoit.bolsee@online.be>
Thu, 19 Jun 2008 14:40:46 +0000 (14:40 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Thu, 19 Jun 2008 14:40:46 +0000 (14:40 +0000)
source/gameengine/Converter/BL_ShapeDeformer.cpp
source/gameengine/Converter/BL_SkinDeformer.cpp

index b8a589c295a80e223d2af101cc335f186f57b7f5..3ae634905b91df83f70f2e39352cbaed584ac9a4 100644 (file)
@@ -118,7 +118,9 @@ bool BL_ShapeDeformer::Update(void)
                for (int v =0; v<m_bmesh->totvert; v++)
                        VECCOPY(m_transverts[v], m_bmesh->mvert[v].co);
 
+#ifdef __NLA_DEFNORMALS
                RecalcNormals();
+#endif
                bSkinUpdate = true;
        }
        return bSkinUpdate;
index 78fc73f21a1f3e30fd1985de3e301b2c250d86bb..1015221c392c6dd104f5d8b6a7c081f4b013b5f3 100644 (file)
@@ -108,9 +108,7 @@ bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat)
        MT_Point3 pt;
 //     float co[3];
 
-       if (!Update())
-               // no need to update the cache
-               return false;
+       Update();
 
        array = m_pMeshObject->GetVertexCache(mat);
        mvarray = m_pMeshObject->GetMVertCache(mat);