diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-15 18:54:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-15 18:54:15 +0400 |
commit | 6520aa97a93e2438ddb739b2b990061ed18ab1d7 (patch) | |
tree | 661662ab9cf2b71cb245ae5f0c8f70c3dc71a687 /source/blender/python/bmesh/bmesh_py_api.c | |
parent | 24286ba5bd75b29ce454b85585272b7741c7d6c3 (diff) |
add 'idprop' module so we can document idprop.types.*, currently doc generator has no access to ID Property types.
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_api.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c index 77276df49f2..4d8d4e3bc23 100644 --- a/source/blender/python/bmesh/bmesh_py_api.c +++ b/source/blender/python/bmesh/bmesh_py_api.c @@ -129,7 +129,7 @@ PyObject *BPyInit_bmesh(void) { PyObject *mod; PyObject *submodule; - PyObject *sys_modules = PySys_GetObject("modules"); /* not pretty */ + PyObject *sys_modules = PyThreadState_GET()->interp->modules; BPy_BM_init_types(); BPy_BM_init_types_select(); @@ -140,11 +140,11 @@ PyObject *BPyInit_bmesh(void) /* bmesh.types */ PyModule_AddObject(mod, "types", (submodule = BPyInit_bmesh_types())); - PyDict_SetItemString(sys_modules, "bmesh.types", submodule); + PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule); Py_INCREF(submodule); PyModule_AddObject(mod, "utils", (submodule = BPyInit_bmesh_utils())); - PyDict_SetItemString(sys_modules, "bmesh.utils", submodule); + PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule); Py_INCREF(submodule); return mod; |