Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-30 08:49:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-30 08:49:13 +0400
commit6a473305af22468abfc4c4f8f3002dc0a97fffd7 (patch)
treebd908052010f661a93ff3cfeb356490cb391f521 /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
parent0d6ae3fda2e5a3dbde941b6985e6895a42c71b9e (diff)
Fix T37920: BGE LibLoad failed for meshes with no materials
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
index 0c715524218..b7a5804c069 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::RemoveMesh(RAS_MeshSlot* ms)
+void RAS_MaterialBucket::RemoveMeshSlot(RAS_MeshSlot *ms)
{
list<RAS_MeshSlot>::iterator it;
@@ -570,6 +570,20 @@ void RAS_MaterialBucket::RemoveMesh(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();