Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/mathutils/mathutils_Quaternion.c
| Show First 20 Lines • Show All 1,094 Lines • ▼ Show 20 Lines | static int Quaternion_axis_vector_set(QuaternionObject *self, PyObject *value, void *UNUSED(closure)) | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| /* ----------------------------------mathutils.Quaternion() -------------- */ | /* ----------------------------------mathutils.Quaternion() -------------- */ | ||||
| static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kwds) | static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kwds) | ||||
| { | { | ||||
| PyObject *seq = NULL; | PyObject *seq = NULL; | ||||
| double angle = 0.0f; | double angle = 0.0f; | ||||
| float quat[QUAT_SIZE] = {0.0f, 0.0f, 0.0f, 0.0f}; | float quat[QUAT_SIZE]; | ||||
| unit_qt(quat); | |||||
| if (kwds && PyDict_Size(kwds)) { | if (kwds && PyDict_Size(kwds)) { | ||||
| PyErr_SetString(PyExc_TypeError, | PyErr_SetString(PyExc_TypeError, | ||||
| "mathutils.Quaternion(): " | "mathutils.Quaternion(): " | ||||
| "takes no keyword args"); | "takes no keyword args"); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines | |||||