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:
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))
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue