[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34638] trunk/blender/source/blender/ python/generic: swap Matrix.Shear(...) arguments so matrix size is the second argument, matching other constructors.
Campbell Barton
ideasman42 at gmail.com
Fri Feb 4 10:41:59 CET 2011
Revision: 34638
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34638
Author: campbellbarton
Date: 2011-02-04 09:41:59 +0000 (Fri, 04 Feb 2011)
Log Message:
-----------
swap Matrix.Shear(...) arguments so matrix size is the second argument, matching other constructors.
Modified Paths:
--------------
trunk/blender/source/blender/python/generic/mathutils.c
trunk/blender/source/blender/python/generic/mathutils_matrix.c
Modified: trunk/blender/source/blender/python/generic/mathutils.c
===================================================================
--- trunk/blender/source/blender/python/generic/mathutils.c 2011-02-04 09:35:20 UTC (rev 34637)
+++ trunk/blender/source/blender/python/generic/mathutils.c 2011-02-04 09:41:59 UTC (rev 34638)
@@ -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
Modified: trunk/blender/source/blender/python/generic/mathutils_matrix.c
===================================================================
--- trunk/blender/source/blender/python/generic/mathutils_matrix.c 2011-02-04 09:35:20 UTC (rev 34637)
+++ trunk/blender/source/blender/python/generic/mathutils_matrix.c 2011-02-04 09:41:59 UTC (rev 34638)
@@ -495,16 +495,16 @@
}
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 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"
-" :arg size: The size of the shear matrix to construct [2, 4].\n"
-" :type size: int\n"
" :return: A new shear matrix.\n"
" :rtype: :class:`Matrix`\n"
;
@@ -516,7 +516,7 @@
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) {
More information about the Bf-blender-cvs
mailing list