From 654fde2dd213e8799da09875eab961d5286b2452 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 29 May 2020 14:50:29 +1000 Subject: 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. --- source/blender/python/intern/bpy_library_write.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'source/blender/python/intern/bpy_library_write.c') 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, +}; -- cgit v1.2.3