Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/mathutils/mathutils_Matrix.c
| Show First 20 Lines • Show All 3,360 Lines • ▼ Show 20 Lines | #endif | ||||
| NULL, /*tp_dict*/ | NULL, /*tp_dict*/ | ||||
| NULL, /*tp_descr_get*/ | NULL, /*tp_descr_get*/ | ||||
| NULL, /*tp_descr_set*/ | NULL, /*tp_descr_set*/ | ||||
| 0, /*tp_dictoffset*/ | 0, /*tp_dictoffset*/ | ||||
| NULL, /*tp_init*/ | NULL, /*tp_init*/ | ||||
| NULL, /*tp_alloc*/ | NULL, /*tp_alloc*/ | ||||
| Matrix_new, /*tp_new*/ | Matrix_new, /*tp_new*/ | ||||
| NULL, /*tp_free*/ | NULL, /*tp_free*/ | ||||
| NULL, /*tp_is_gc*/ | (inquiry)BaseMathObject_is_gc, /*tp_is_gc*/ | ||||
| NULL, /*tp_bases*/ | NULL, /*tp_bases*/ | ||||
| NULL, /*tp_mro*/ | NULL, /*tp_mro*/ | ||||
| NULL, /*tp_cache*/ | NULL, /*tp_cache*/ | ||||
| NULL, /*tp_subclasses*/ | NULL, /*tp_subclasses*/ | ||||
| NULL, /*tp_weaklist*/ | NULL, /*tp_weaklist*/ | ||||
| NULL, /*tp_del*/ | NULL, /*tp_del*/ | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | PyObject *Matrix_CreatePyObject_cb( | ||||
| PyObject *cb_user, const ushort col_num, const ushort row_num, uchar cb_type, uchar cb_subtype) | PyObject *cb_user, const ushort col_num, const ushort row_num, uchar cb_type, uchar cb_subtype) | ||||
| { | { | ||||
| MatrixObject *self = (MatrixObject *)Matrix_CreatePyObject(NULL, col_num, row_num, NULL); | MatrixObject *self = (MatrixObject *)Matrix_CreatePyObject(NULL, col_num, row_num, NULL); | ||||
| if (self) { | if (self) { | ||||
| Py_INCREF(cb_user); | Py_INCREF(cb_user); | ||||
| self->cb_user = cb_user; | self->cb_user = cb_user; | ||||
| self->cb_type = cb_type; | self->cb_type = cb_type; | ||||
| self->cb_subtype = cb_subtype; | self->cb_subtype = cb_subtype; | ||||
| BLI_assert(!PyObject_GC_IsTracked((PyObject *)self)); | |||||
| PyObject_GC_Track(self); | PyObject_GC_Track(self); | ||||
| } | } | ||||
| return (PyObject *)self; | return (PyObject *)self; | ||||
| } | } | ||||
| PyObject *Matrix_CreatePyObject_alloc(float *mat, | PyObject *Matrix_CreatePyObject_alloc(float *mat, | ||||
| const ushort col_num, | const ushort col_num, | ||||
| const ushort row_num, | const ushort row_num, | ||||
| ▲ Show 20 Lines • Show All 328 Lines • Show Last 20 Lines | |||||