Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy.c
| Show First 20 Lines • Show All 649 Lines • ▼ Show 20 Lines | #endif | ||||
| for (int i = 0; bpy_methods[i].ml_name; i++) { | for (int i = 0; bpy_methods[i].ml_name; i++) { | ||||
| PyMethodDef *m = &bpy_methods[i]; | PyMethodDef *m = &bpy_methods[i]; | ||||
| /* Currently there is no need to support these. */ | /* Currently there is no need to support these. */ | ||||
| BLI_assert((m->ml_flags & (METH_CLASS | METH_STATIC)) == 0); | BLI_assert((m->ml_flags & (METH_CLASS | METH_STATIC)) == 0); | ||||
| PyModule_AddObject(mod, m->ml_name, (PyObject *)PyCFunction_New(m, NULL)); | PyModule_AddObject(mod, m->ml_name, (PyObject *)PyCFunction_New(m, NULL)); | ||||
| } | } | ||||
| /* register funcs (bpy_rna.c) */ | /* Register functions (`bpy_rna.c`). */ | ||||
| PyModule_AddObject(mod, | PyModule_AddObject(mod, | ||||
| meth_bpy_register_class.ml_name, | meth_bpy_register_class.ml_name, | ||||
| (PyObject *)PyCFunction_New(&meth_bpy_register_class, NULL)); | (PyObject *)PyCFunction_New(&meth_bpy_register_class, NULL)); | ||||
| PyModule_AddObject(mod, | PyModule_AddObject(mod, | ||||
| meth_bpy_unregister_class.ml_name, | meth_bpy_unregister_class.ml_name, | ||||
| (PyObject *)PyCFunction_New(&meth_bpy_unregister_class, NULL)); | (PyObject *)PyCFunction_New(&meth_bpy_unregister_class, NULL)); | ||||
| PyModule_AddObject(mod, | PyModule_AddObject(mod, | ||||
| Show All 9 Lines | |||||