svn merge -r 30954:31059 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / gameengine / Ketsji / KX_PythonInit.cpp
index 36f1f5cfa62f548c0c9c9e844dd6d6b6a13ff457..695ad33bccfdf64fce4f21bd37ee95aa348a4a58 100644 (file)
@@ -1904,9 +1904,8 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
        first_time = false;
        
        PyObjectPlus::ClearDeprecationWarning();
-       
-       PyObject* moduleobj = PyImport_AddModule("__main__");
-       return PyModule_GetDict(moduleobj);
+
+       return bpy_namespace_dict_new(NULL);
 }
 
 void exitGamePlayerPythonScripting()
@@ -1941,9 +1940,8 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
        initPySysObjects(maggie);
 
        PyObjectPlus::NullDeprecationWarning();
-       
-       PyObject* moduleobj = PyImport_AddModule("__main__");
-       return PyModule_GetDict(moduleobj);
+
+       return bpy_namespace_dict_new(NULL);
 }
 
 void exitGamePythonScripting()