[Bf-blender-cvs] [96b4e43e8dc] master: Fix T55527: creating a Quaternion without args should result in identity quaternion
Philipp Oeser
noreply at git.blender.org
Mon Jul 16 15:15:29 CEST 2018
Commit: 96b4e43e8dcdf3c051be2b52bb453c55d6afcd08
Author: Philipp Oeser
Date: Mon Jul 16 09:37:24 2018 +0200
Branches: master
https://developer.blender.org/rB96b4e43e8dcdf3c051be2b52bb453c55d6afcd08
Fix T55527: creating a Quaternion without args should result in identity
quaternion
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D3487
===================================================================
M source/blender/python/mathutils/mathutils_Quaternion.c
===================================================================
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 1a6fd0ee86f..48c18dd20c1 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -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,
More information about the Bf-blender-cvs
mailing list