diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-04 12:41:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-04 12:41:59 +0300 |
commit | 2ef93b1d9226db3ea09d67e207650bddfcda98a2 (patch) | |
tree | 8417f34296d76a8a7734f6ab857f337fcebced1c /source/blender/python | |
parent | feed9c3d1fd006952b3596d550dc56854ed7f52d (diff) |
swap Matrix.Shear(...) arguments so matrix size is the second argument, matching other constructors.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/generic/mathutils.c | 1 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_matrix.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/python/generic/mathutils.c b/source/blender/python/generic/mathutils.c index 086f62cb389..49cd5d2f53e 100644 --- a/source/blender/python/generic/mathutils.c +++ b/source/blender/python/generic/mathutils.c @@ -38,6 +38,7 @@ * - Mathutils.Rand: removed, use pythons random module * - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --> Mathutils.RotationMatrix(angle, size, axis); merge axis & axis_flag args * - Mathutils.OrthoProjectionMatrix(plane, size, axis) --> Mathutils.OrthoProjectionMatrix(axis, size); merge axis & plane args + * - Mathutils.ShearMatrix(plane, factor, size) --> Mathutils.ShearMatrix(plane, size, factor); swap size & factor args, match other constructors. * - Matrix.scalePart --> Matrix.scale_part * - Matrix.translationPart --> Matrix.translation_part * - Matrix.rotationPart --> Matrix.rotation_part diff --git a/source/blender/python/generic/mathutils_matrix.c b/source/blender/python/generic/mathutils_matrix.c index 20367a145eb..1cec0536cc8 100644 --- a/source/blender/python/generic/mathutils_matrix.c +++ b/source/blender/python/generic/mathutils_matrix.c @@ -495,16 +495,16 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args) } static char C_Matrix_Shear_doc[] = -".. classmethod:: Shear(plane, factor, size)\n" +".. classmethod:: Shear(plane, size, factor)\n" "\n" " Create a matrix to represent an shear transformation.\n" "\n" " :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'], where a single axis is for a 2D matrix only.\n" " :type plane: string\n" -" :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix pass a pair of floats corrasponding with the *plane* axis.\n" -" :type factor: float or float pair\n" " :arg size: The size of the shear matrix to construct [2, 4].\n" " :type size: int\n" +" :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix pass a pair of floats corrasponding with the *plane* axis.\n" +" :type factor: float or float pair\n" " :return: A new shear matrix.\n" " :rtype: :class:`Matrix`\n" ; @@ -516,7 +516,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args) float mat[16] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}; - if(!PyArg_ParseTuple(args, "sOi:Matrix.Shear", &plane, &fac, &matSize)) { + if(!PyArg_ParseTuple(args, "siO:Matrix.Shear", &plane, &matSize, &fac)) { return NULL; } if(matSize != 2 && matSize != 3 && matSize != 4) { |