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:
authorErwin Coumans <blender@erwincoumans.com>2006-05-14 07:39:07 +0400
committerErwin Coumans <blender@erwincoumans.com>2006-05-14 07:39:07 +0400
commit337a84ee969ff2c86452f1e54d46beab5ee0d268 (patch)
tree961d44d19bff41e67facb05110b1b659793d4314 /source/gameengine
parentb817c78b0d5c7bd50ac4bf2c4b21751d61cc2342 (diff)
GamePython related: changed ordering of python destruction, and reverted some python changes (it caused problems)
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp16
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.h4
3 files changed, 20 insertions, 2 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index f59faa18d0a..9fcbabba546 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -371,8 +371,8 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
// when exiting the mainloop
dictionaryClearByHand(gameLogic);
- exitGamePythonScripting();
ketsjiengine->StopEngine();
+ exitGamePythonScripting();
networkdevice->Disconnect();
}
if (sceneconverter)
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index 47723c60592..c44971d7028 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -56,6 +56,20 @@ SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj,
{
}
+/*
+//debugging
+CValue* SCA_PythonController::AddRef()
+{
+ //printf("AddRef refcount = %i\n",GetRefCount());
+ return CValue::AddRef();
+}
+int SCA_PythonController::Release()
+{
+ //printf("Release refcount = %i\n",GetRefCount());
+ return CValue::Release();
+}
+*/
+
SCA_PythonController::~SCA_PythonController()
@@ -278,7 +292,7 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
Py_DECREF(excdict);*/
-#if 0
+#if 1
PyObject *excdict= PyDict_Copy(m_pythondictionary);
PyObject* resultobj = PyEval_EvalCode((PyCodeObject*)m_bytecode,
excdict,
diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h
index 574bf35be7e..da2cd4b0bcd 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.h
+++ b/source/gameengine/GameLogic/SCA_PythonController.h
@@ -54,6 +54,10 @@ class SCA_PythonController : public SCA_IController
public:
static SCA_PythonController* m_sCurrentController; // protected !!!
+ //for debugging
+ //virtual CValue* AddRef();
+ //virtual int Release(); // Release a reference to this value (when reference count reaches 0, the value is removed from the heap)
+
SCA_PythonController(SCA_IObject* gameobj,PyTypeObject* T = &Type);
virtual ~SCA_PythonController();