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>2020-05-29 07:50:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-29 08:55:25 +0300
commit654fde2dd213e8799da09875eab961d5286b2452 (patch)
tree28ead63734dbde1f1f003f16c97781c0aaafc58c /source/blender/python/intern/bpy_library_write.c
parente115b7b06d325c00edae733f3eefd6dbab2dd89e (diff)
PyAPI: use bpy_rna_types_capi.c to set type methods
Remove use of '_bpy' as an intermediate module to store functions which were then assigned in bpy_types.py.
Diffstat (limited to 'source/blender/python/intern/bpy_library_write.c')
-rw-r--r--source/blender/python/intern/bpy_library_write.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/python/intern/bpy_library_write.c b/source/blender/python/intern/bpy_library_write.c
index 6c8f1deb126..fec0cef7b05 100644
--- a/source/blender/python/intern/bpy_library_write.c
+++ b/source/blender/python/intern/bpy_library_write.c
@@ -204,16 +204,9 @@ finally:
return ret;
}
-int BPY_library_write_module(PyObject *mod_par)
-{
- static PyMethodDef write_meth = {
- "write",
- (PyCFunction)bpy_lib_write,
- METH_STATIC | METH_VARARGS | METH_KEYWORDS,
- bpy_lib_write_doc,
- };
-
- PyModule_AddObject(mod_par, "_library_write", PyCFunction_New(&write_meth, NULL));
-
- return 0;
-}
+PyMethodDef BPY_library_write_method_def = {
+ "write",
+ (PyCFunction)bpy_lib_write,
+ METH_STATIC | METH_VARARGS | METH_KEYWORDS,
+ bpy_lib_write_doc,
+};