diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-22 17:49:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-22 17:50:01 +0400 |
commit | 51c32ac1996f3e6794b1fe29d4e03b10360f9455 (patch) | |
tree | 797273ebd87fe0824c9021b5104b0dd601cb6664 /source/gameengine | |
parent | 9c883a1ecabe387533909b1e3116c2c30418f6e9 (diff) |
Revert "Fix T37920: BGE LibLoad failed for meshes with no materials"
This reverts commit 6a473305af22468abfc4c4f8f3002dc0a97fffd7.
Caused T38296, need to investigate this further but for now
better not leave blender in unstable state.
Diffstat (limited to 'source/gameengine')
4 files changed, 3 insertions, 25 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 1d7d3eba617..c58746a22c1 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -1313,8 +1313,6 @@ bool KX_BlenderSceneConverter::FreeBlendFile(struct Main *maggie) int size_before = obs->GetCount(); - gameobj->RemoveMeshes(); - /* Eventually calls RemoveNodeDestructObject * frees m_map_gameobject_to_blender from UnregisterGameObject */ scene->RemoveObject(gameobj); diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index b7a5804c069..0c715524218 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -558,7 +558,7 @@ RAS_MeshSlot* RAS_MaterialBucket::CopyMesh(RAS_MeshSlot *ms) return &m_meshSlots.back(); } -void RAS_MaterialBucket::RemoveMeshSlot(RAS_MeshSlot *ms) +void RAS_MaterialBucket::RemoveMesh(RAS_MeshSlot* ms) { list<RAS_MeshSlot>::iterator it; @@ -570,20 +570,6 @@ void RAS_MaterialBucket::RemoveMeshSlot(RAS_MeshSlot *ms) } } -void RAS_MaterialBucket::RemoveMesh(RAS_MeshObject *mesh) -{ - list<RAS_MeshSlot>::iterator it; - it=m_meshSlots.begin(); - while (it != m_meshSlots.end()) { - if ((*it).m_mesh == mesh) { - m_meshSlots.erase(it++); - } - else { - ++it; - } - } -} - list<RAS_MeshSlot>::iterator RAS_MaterialBucket::msBegin() { return m_meshSlots.begin(); diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h index a55bf1d1ba9..007fdf240c4 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h @@ -228,8 +228,7 @@ public: class RAS_MeshSlot* AddMesh(int numverts); class RAS_MeshSlot* CopyMesh(class RAS_MeshSlot *ms); - void RemoveMeshSlot(class RAS_MeshSlot *ms); - void RemoveMesh(class RAS_MeshObject *mesh); + void RemoveMesh(class RAS_MeshSlot* ms); void Optimize(MT_Scalar distance); void ActivateMesh(RAS_MeshSlot* slot) { diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index fb13596890f..ff909b5955f 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -458,14 +458,9 @@ void RAS_MeshObject::RemoveFromBuckets(void *clientobj) if (!msp) continue; - /* see [#37920] */ -#if 0 RAS_MeshSlot *ms = *msp; - it->m_bucket->RemoveMeshSlot(ms); -#else - it->m_bucket->RemoveMesh(this); -#endif + it->m_bucket->RemoveMesh(ms); it->m_slots.remove(clientobj); } } |