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.
This commit is contained in:
2020-05-29 14:50:29 +10:00
parent e115b7b06d
commit 654fde2dd2
9 changed files with 86 additions and 63 deletions

View File

@@ -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,
};