diff options
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 123c938b921..94af148da85 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -46,7 +46,6 @@ #include "RNA_types.h" #include "bpy.h" -#include "gpu.h" #include "bpy_rna.h" #include "bpy_path.h" #include "bpy_capi_utils.h" @@ -75,6 +74,7 @@ #include "../generic/blf_py_api.h" #include "../generic/idprop_py_api.h" #include "../generic/imbuf_py_api.h" +#include "../gpu/gpu_py_api.h" #include "../bmesh/bmesh_py_api.h" #include "../mathutils/mathutils.h" @@ -233,7 +233,7 @@ static struct _inittab bpy_internal_modules[] = { #ifdef WITH_CYCLES {"_cycles", CCL_initPython}, #endif - {"gpu", GPU_initPython}, + {"gpu", BPyInit_gpu}, {"idprop", BPyInit_idprop}, {NULL, NULL} }; @@ -537,7 +537,8 @@ static bool python_script_exec( if (py_dict) { #ifdef PYMODULE_CLEAR_WORKAROUND - PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItemString(PyImport_GetModuleDict(), "__main__"); + PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItem( + PyImport_GetModuleDict(), bpy_intern_str___main__); PyObject *dict_back = mmod->md_dict; /* freeing the module will clear the namespace, * gives problems running classes defined in this namespace being used later. */ |