From 349cafac5243e1958f211cf67ee803cd3421a830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 21 Apr 2017 15:48:53 +0200 Subject: =?UTF-8?q?Matrix.decompose():=20changed=20terminology,=20"locatio?= =?UTF-8?q?n"=20=E2=86=92=20"translation"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Matrix.decompose() should either return "location, orientation, size" or "translation, rotation, scale". Since there are constructors for the former, I've replaced "location" in the documentation with "translation". The code is still the same, I just changed the documentation. --- source/blender/python/mathutils/mathutils_Matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/python/mathutils/mathutils_Matrix.c') diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index bd44e77e7c6..10f428ba355 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1641,9 +1641,9 @@ static PyObject *Matrix_rotate(MatrixObject *self, PyObject *value) PyDoc_STRVAR(Matrix_decompose_doc, ".. method:: decompose()\n" "\n" -" Return the location, rotation and scale components of this matrix.\n" +" Return the translation, rotation and scale components of this matrix.\n" "\n" -" :return: loc, rot, scale triple.\n" +" :return: trans, rot, scale triple.\n" " :rtype: (:class:`Vector`, :class:`Quaternion`, :class:`Vector`)" ); static PyObject *Matrix_decompose(MatrixObject *self) -- cgit v1.2.3 From 81e584ed17902878579131776b4e5a9f7b54cdab Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 20 May 2017 14:01:03 +1000 Subject: CMake: Use GCC7's -Wimplicit-fallthrough=5 Use to avoid accidental missing break statements, use ATTR_FALLTHROUGH to suppress. --- source/blender/python/mathutils/mathutils_Matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/python/mathutils/mathutils_Matrix.c') diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 10f428ba355..bfd23af257b 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -2034,7 +2034,7 @@ static PyObject *Matrix_richcmpr(PyObject *a, PyObject *b, int op) switch (op) { case Py_NE: ok = !ok; - /* fall-through */ + ATTR_FALLTHROUGH; case Py_EQ: res = ok ? Py_False : Py_True; break; -- cgit v1.2.3 From 98df7d778f8b9318388bf24ab6be3b4930ef2f6f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 26 May 2017 17:00:20 +1000 Subject: Fix T51287: Matrix.lerp fails w/ shear Use interp_m4_m4m4 (wraps Eigen), `MATH_STANDALONE` will need to be updated to support this. --- source/blender/python/mathutils/mathutils_Matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/python/mathutils/mathutils_Matrix.c') diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index bfd23af257b..e368e8871f3 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1709,10 +1709,10 @@ static PyObject *Matrix_lerp(MatrixObject *self, PyObject *args) /* TODO, different sized matrix */ if (self->num_col == 4 && self->num_row == 4) { - blend_m4_m4m4((float (*)[4])mat, (float (*)[4])self->matrix, (float (*)[4])mat2->matrix, fac); + interp_m4_m4m4((float (*)[4])mat, (float (*)[4])self->matrix, (float (*)[4])mat2->matrix, fac); } else if (self->num_col == 3 && self->num_row == 3) { - blend_m3_m3m3((float (*)[3])mat, (float (*)[3])self->matrix, (float (*)[3])mat2->matrix, fac); + interp_m3_m3m3((float (*)[3])mat, (float (*)[3])self->matrix, (float (*)[3])mat2->matrix, fac); } else { PyErr_SetString(PyExc_ValueError, -- cgit v1.2.3