Fix T55527: creating a Quaternion without args should result in identity

quaternion

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3487
This commit is contained in:
Philipp Oeser 2018-07-16 09:37:24 +02:00
parent 80795ff897
commit 96b4e43e8d
Notes: blender-bot 2023-02-14 19:28:47 +01:00
Referenced by issue blender/blender-addons#55527, Quaternion() returning "Quaternion((0.0, 0.0, 0.0, 0.0))" Instead of Quaternion((1.0, 0.0, 0.0, 0.0))
1 changed files with 2 additions and 1 deletions

View File

@ -1100,7 +1100,8 @@ static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kw
{
PyObject *seq = NULL;
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)) {
PyErr_SetString(PyExc_TypeError,