diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-11 01:03:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-11 01:03:26 +0300 |
commit | affe84a4536c6b7966aee227ae01edbf0861c60b (patch) | |
tree | ba39edeb7d497cd803bd173517f0169caf2dd09e /source/gameengine/GamePlayer | |
parent | 34794eafe495586761af883b292c16a939d17df8 (diff) |
get rid of annoying duplicate python initialization code, added setupGamePython() which initializes modules
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index c6952a68a58..323e88187bd 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -679,21 +679,11 @@ bool GPG_Application::startEngine(void) startscenename, m_startScene); - - // some python things - PyObject* dictionaryobject = initGamePlayerPythonScripting("Ketsji", psl_Lowest, m_maggie, m_argc, m_argv); - m_ketsjiengine->SetPyNamespace(dictionaryobject); - initRasterizer(m_rasterizer, m_canvas); - PyObject *gameLogic = initGameLogic(m_ketsjiengine, startscene); - PyDict_SetItemString(dictionaryobject, "GameLogic", gameLogic); // Same as importing the module - initGameKeys(); - initPythonConstraintBinding(); - initMathutils(); - initGeometry(); - initBGL(); -#ifdef WITH_FFMPEG - initVideoTexture(); -#endif +#ifndef DISABLE_PYTHON + // some python things + PyObject *gameLogic, *gameLogic_keys; + setupGamePython(m_ketsjiengine, startscene, m_maggie, NULL, &gameLogic, &gameLogic_keys, m_argc, m_argv); +#endif // DISABLE_PYTHON //initialize Dome Settings if(m_startScene->gm.stereoflag == STEREO_DOME) |