Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-25 20:46:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-25 20:46:46 +0400
commit41ee294618d88e85e58efc6d2d977244d4275b1a (patch)
treea420c7c92993ceb84286968303ca33a96572b7f1 /source/blender/python
parent8197ae005407f86b1eeb1d805c9402eb17f8cefa (diff)
don't pass the same value to axis_angle_to_quat() for axis & quat.
-/-This line, and those below, will be ignored-- M mathutils_Quaternion.c
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 5ac1214409f..40c0215ffd1 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1085,12 +1085,15 @@ static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kw
return NULL;
break;
case 2:
- if (mathutils_array_parse(quat, 3, 3, seq, "mathutils.Quaternion()") == -1)
+ {
+ float axis[3];
+ if (mathutils_array_parse(axis, 3, 3, seq, "mathutils.Quaternion()") == -1)
return NULL;
angle = angle_wrap_rad(angle); /* clamp because of precision issues */
- axis_angle_to_quat(quat, quat, angle);
+ axis_angle_to_quat(quat, axis, angle);
break;
/* PyArg_ParseTuple assures no more then 2 */
+ }
}
return Quaternion_CreatePyObject(quat, Py_NEW, type);
}