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:
authorCampbell Barton <ideasman42@gmail.com>2011-04-18 12:27:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-18 12:27:50 +0400
commit0814cdf54ec9a0440c82d0d7ec81b8dc9ecc93ea (patch)
tree2875bf7d64fb77d26e2db2dff380efd83027e06a /source/gameengine
parent75e1104d92002a79a5363d27f151c45574f93ecc (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.cpp4
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 */