diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-18 12:27:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-18 12:27:50 +0400 |
commit | 0814cdf54ec9a0440c82d0d7ec81b8dc9ecc93ea (patch) | |
tree | 2875bf7d64fb77d26e2db2dff380efd83027e06a /source/gameengine | |
parent | 75e1104d92002a79a5363d27f151c45574f93ecc (diff) |
fix [#26951] blenderplayer and runtimes will not load
blenderplayer wasn't finding bundled python, eg: ./2.57/python/lib
Diffstat (limited to 'source/gameengine')
-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 ba698d79fdd..a3738995db3 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -1758,6 +1758,7 @@ static struct _inittab bge_internal_modules[]= { /** * Python is not initialised. + * see bpy_interface.c's BPY_python_start() which shares the same functionality in blender. */ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecurityLevel level, Main *maggie, int argc, char** argv) { @@ -1779,6 +1780,9 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur /* must run before python initializes */ PyImport_ExtendInittab(bge_internal_modules); + /* find local python installation */ + PyC_SetHomePath(BLI_get_folder(BLENDER_PYTHON, NULL)); + Py_Initialize(); if(argv && first_time) { /* browser plugins dont currently set this */ |