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:
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-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 */