diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_MeshProxy.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_MeshProxy.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 8e803c46358..f7cd13acf27 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -387,16 +387,13 @@ PyObject *KX_MeshProxy::pyattr_get_materials(void *self_v, const KX_PYATTRIBUTE_ for (i=0; i<tot; mit++, i++) { - RAS_IPolyMaterial *polymat = mit->m_bucket->GetPolyMaterial(); - - /* Why do we need to check for RAS_BLENDERMAT if both are cast to a (PyObject *)? - Campbell */ - if (polymat->GetFlag() & RAS_BLENDERMAT) - { - KX_BlenderMaterial *mat = static_cast<KX_BlenderMaterial*>(polymat); + RAS_IPolyMaterial *polymat = mit->m_bucket->GetPolyMaterial(); + if (polymat->GetFlag() & RAS_BLENDERMAT) { + KX_BlenderMaterial *mat = static_cast<KX_BlenderMaterial *>(polymat); PyList_SET_ITEM(materials, i, mat->GetProxy()); } else { - KX_PolygonMaterial *mat = static_cast<KX_PolygonMaterial*>(polymat); + KX_PolygonMaterial *mat = static_cast<KX_PolygonMaterial *>(polymat); PyList_SET_ITEM(materials, i, mat->GetProxy()); } } |