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>2018-09-13 10:08:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-13 10:08:58 +0300
commit76d67b4db431591ddf18b131c462bd857950f254 (patch)
tree2b3d5cb4c97b70812f92bdde2ca52b197504de13 /source/blender/python
parent1c2358224f400bc503be116dbddd9312c1b1c914 (diff)
parent44f719b63238503ef8f933f55383c6d4798995cc (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/bmesh/bmesh_py_api.c2
-rw-r--r--source/blender/python/generic/idprop_py_api.c2
-rw-r--r--source/blender/python/gpu/gpu_py_api.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c2
-rw-r--r--source/blender/python/intern/gpu.c2
-rw-r--r--source/blender/python/mathutils/mathutils.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index d6189f7c1eb..7669f7eb1fd 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -191,7 +191,7 @@ PyObject *BPyInit_bmesh(void)
{
PyObject *mod;
PyObject *submodule;
- PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+ PyObject *sys_modules = PyImport_GetModuleDict();
BPy_BM_init_types();
BPy_BM_init_types_select();
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index 4d4d5232800..8bed0f28cba 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -1795,7 +1795,7 @@ PyObject *BPyInit_idprop(void)
{
PyObject *mod;
PyObject *submodule;
- PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+ PyObject *sys_modules = PyImport_GetModuleDict();
mod = PyModule_Create(&IDProp_module_def);
diff --git a/source/blender/python/gpu/gpu_py_api.c b/source/blender/python/gpu/gpu_py_api.c
index fc1e7390ffe..04a27af09f1 100644
--- a/source/blender/python/gpu/gpu_py_api.c
+++ b/source/blender/python/gpu/gpu_py_api.c
@@ -61,7 +61,7 @@ static struct PyModuleDef GPU_module_def = {
PyObject *BPyInit_gpu(void)
{
- PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+ PyObject *sys_modules = PyImport_GetModuleDict();
PyObject *submodule;
PyObject *mod;
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 3ba024de7c2..94af148da85 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -538,7 +538,7 @@ static bool python_script_exec(
if (py_dict) {
#ifdef PYMODULE_CLEAR_WORKAROUND
PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItem(
- PyThreadState_GET()->interp->modules, bpy_intern_str___main__);
+ 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. */
diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c
index eb28e4d4e1c..71143585657 100644
--- a/source/blender/python/intern/gpu.c
+++ b/source/blender/python/intern/gpu.c
@@ -85,7 +85,7 @@ PyObject *GPU_initPython(void)
{
PyObject *module;
PyObject *submodule;
- PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+ PyObject *sys_modules = PyImport_GetModuleDict();
module = PyInit_gpu();
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index a3a4e7f313b..f021d456b3a 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -615,7 +615,7 @@ PyMODINIT_FUNC PyInit_mathutils(void)
{
PyObject *mod;
PyObject *submodule;
- PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+ PyObject *sys_modules = PyImport_GetModuleDict();
if (PyType_Ready(&vector_Type) < 0)
return NULL;