diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-08-19 15:53:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-08-19 15:53:24 +0400 |
commit | 812583f1fa7a85406b55083ef3876ff506bebe7c (patch) | |
tree | 08fdc1ae35fb1b6651afe66d09831dc0383999a7 /source/gameengine/Ketsji | |
parent | 7f49f6735288418af81d80c99f6127c31a2ed3d4 (diff) |
Added GameLogic.globalDict, this is a place where data can be stored even when new blend files are loaded. Using for apricot so frankie can go into levels in new blendfiles keeping his inventory, currently it dosnt work for the blenderplayer which stops python before loading new blend files.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 868439546c3..472ae759d65 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -733,6 +733,10 @@ PyObject* initGameLogic(KX_Scene* scene) // quick hack to get gravity hook // Add some symbolic constants to the module d = PyModule_GetDict(m); + + // can be overwritten later for gameEngine instances that can load new blend files and re-initialize this module + // for now its safe to make sure it exists for other areas such as the web plugin + PyDict_SetItemString(d, "globalDict", PyDict_New()); ErrorObject = PyString_FromString("GameLogic.error"); PyDict_SetItemString(d, "error", ErrorObject); |