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-03-21 03:37:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-21 03:37:54 +0400
commit5935ff3aaa7dba6f065cad8d020de566ce21dff2 (patch)
tree6f2bc11a7acff403c25cfc588ca91732c994247b /source/blender/python/mathutils/mathutils_Quaternion.c
parentc2531e47b6e3139ae8042f8d26f4e8f21b09d586 (diff)
fix for Quaternion.to_axis_angle() returning a zero axis vector.
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Quaternion.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 190c389388d..80910c409bc 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1105,7 +1105,8 @@ static PyObject *quat__apply_to_copy(PyNoArgsFunction quat_func, QuaternionObjec
static void quat__axis_angle_sanitize(float axis[3], float *angle)
{
if (axis) {
- if (!finite(axis[0]) ||
+ if (is_zero_v3(axis) ||
+ !finite(axis[0]) ||
!finite(axis[1]) ||
!finite(axis[2]))
{