diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-21 03:03:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-21 03:03:37 +0300 |
commit | de356415ae5748477b43e0e067c43889458bb367 (patch) | |
tree | 6536c896aa9f07bd9b987536d84bcfdb96e32c89 /source/blender/python | |
parent | a1164ce271d95e4537d169fd4fd34ece00aa81cb (diff) |
Correct comments & some explanation from last commit
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Vector.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 82365c6d00e..ccfecf62979 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -1717,6 +1717,8 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) } + /* Intentionally don't support (Quaternion) here, uses reverse order instead. */ + /* make sure v1 is always the vector */ if (vec1 && vec2) { if (vec1->size != vec2->size) { @@ -1778,7 +1780,9 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) if (BaseMath_ReadCallback_ForWrite(vec) == -1) return NULL; - /* only support vec*=float and vec*=mat + /* Intentionally don't support (Quaternion, Matrix) here, uses reverse order instead. */ + + /* only support 'vec *= float' * vec*=vec result is a float so that wont work */ if (((scalar = PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred()) == 0) { /* VEC *= FLOAT */ mul_vn_fl(vec->vec, vec->size, scalar); |