Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/mathutils/mathutils_Quaternion.c
| Show First 20 Lines • Show All 1,718 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 */ | ||||
| Quaternion_new, /* tp_new */ | Quaternion_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 59 Lines • ▼ Show 20 Lines | |||||
| PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user, uchar cb_type, uchar cb_subtype) | PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user, uchar cb_type, uchar cb_subtype) | ||||
| { | { | ||||
| QuaternionObject *self = (QuaternionObject *)Quaternion_CreatePyObject(NULL, NULL); | QuaternionObject *self = (QuaternionObject *)Quaternion_CreatePyObject(NULL, 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; | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||