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:
Diffstat (limited to 'source/gameengine/GameLogic/SCA_IScene.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_IScene.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_IScene.cpp b/source/gameengine/GameLogic/SCA_IScene.cpp
index c98c86639d3..3ca4b6607b3 100644
--- a/source/gameengine/GameLogic/SCA_IScene.cpp
+++ b/source/gameengine/GameLogic/SCA_IScene.cpp
@@ -70,6 +70,32 @@ std::vector<SCA_DebugProp*>& SCA_IScene::GetDebugProperties()
}
+bool SCA_IScene::PropertyInDebugList( class CValue *gameobj, const STR_String &name )
+{
+ for (std::vector<SCA_DebugProp*>::iterator it = m_debugList.begin();
+ !(it==m_debugList.end());++it) {
+ STR_String debugname = (*it)->m_name;
+ CValue *debugobj = (*it)->m_obj;
+
+ if (debugobj == gameobj && debugname == name)
+ return true;
+ }
+ return false;
+}
+
+
+bool SCA_IScene::ObjectInDebugList( class CValue *gameobj )
+{
+ for (std::vector<SCA_DebugProp*>::iterator it = m_debugList.begin();
+ !(it==m_debugList.end());++it) {
+ CValue* debugobj = (*it)->m_obj;
+
+ if (debugobj == gameobj)
+ return true;
+ }
+ return false;
+}
+
void SCA_IScene::AddDebugProperty(class CValue* debugprop,
const STR_String &name)
@@ -84,6 +110,24 @@ void SCA_IScene::AddDebugProperty(class CValue* debugprop,
}
+void SCA_IScene::RemoveDebugProperty(class CValue *gameobj,
+ const STR_String &name)
+{
+ vector<SCA_DebugProp*>::iterator it = m_debugList.begin();
+ while(it != m_debugList.end()) {
+ STR_String debugname = (*it)->m_name;
+ CValue *debugobj = (*it)->m_obj;
+
+ if (debugobj == gameobj && debugname == name) {
+ delete (*it);
+ m_debugList.erase(it);
+ break;
+ }
+ ++it;
+ }
+}
+
+
void SCA_IScene::RemoveObjectDebugProperties(class CValue* gameobj)
{
vector<SCA_DebugProp*>::iterator it = m_debugList.begin();