[Bf-blender-cvs] [c197c210e48] blender2.8: PyAPI: add bpy.app.icons to sys.modules
Campbell Barton
noreply at git.blender.org
Thu Sep 13 09:45:40 CEST 2018
Commit: c197c210e48c708eb380849488bd082adbc044eb
Author: Campbell Barton
Date: Thu Sep 13 17:20:27 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBc197c210e48c708eb380849488bd082adbc044eb
PyAPI: add bpy.app.icons to sys.modules
===================================================================
M source/blender/python/intern/bpy_app_icons.c
===================================================================
diff --git a/source/blender/python/intern/bpy_app_icons.c b/source/blender/python/intern/bpy_app_icons.c
index 4bd059dd295..19e369e4bff 100644
--- a/source/blender/python/intern/bpy_app_icons.c
+++ b/source/blender/python/intern/bpy_app_icons.c
@@ -177,7 +177,11 @@ static struct PyModuleDef M_AppIcons_module_def = {
PyObject *BPY_app_icons_module(void)
{
+ PyObject *sys_modules = PyImport_GetModuleDict();
+
PyObject *mod = PyModule_Create(&M_AppIcons_module_def);
+ PyDict_SetItem(sys_modules, PyModule_GetNameObject(mod), mod);
+
return mod;
}
More information about the Bf-blender-cvs
mailing list