[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42989] trunk/blender/source/blender/ python/mathutils/mathutils_Matrix.c: PyAPI - remove Matrix.row_size / col_size.

Campbell Barton ideasman42 at gmail.com
Fri Dec 30 07:43:32 CET 2011


Revision: 42989
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42989
Author:   campbellbarton
Date:     2011-12-30 06:43:17 +0000 (Fri, 30 Dec 2011)
Log Message:
-----------
PyAPI - remove Matrix.row_size / col_size. these were rather awkwardly named, but its more clear to use len().

mat.col_size --> len(mat.row)
mat.row_size --> len(mat.col)

Modified Paths:
--------------
    trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c

Modified: trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c
===================================================================
--- trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c	2011-12-30 05:16:28 UTC (rev 42988)
+++ trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c	2011-12-30 06:43:17 UTC (rev 42989)
@@ -2075,22 +2075,6 @@
 		NULL,				/* nb_index */
 };
 
-PyDoc_STRVAR(Matrix_row_size_doc,
-"The row size of the matrix (readonly).\n\n:type: int"
-);
-static PyObject *Matrix_row_size_get(MatrixObject *self, void *UNUSED(closure))
-{
-	return PyLong_FromLong((long) self->num_col);
-}
-
-PyDoc_STRVAR(Matrix_col_size_doc,
-"The column size of the matrix (readonly).\n\n:type: int"
-);
-static PyObject *Matrix_col_size_get(MatrixObject *self, void *UNUSED(closure))
-{
-	return PyLong_FromLong((long) self->num_row);
-}
-
 PyDoc_STRVAR(Matrix_translation_doc,
 "The translation component of the matrix.\n\n:type: Vector"
 );
@@ -2225,8 +2209,6 @@
 /* Python attributes get/set structure:                                      */
 /*****************************************************************************/
 static PyGetSetDef Matrix_getseters[] = {
-	{(char *)"row_size", (getter)Matrix_row_size_get, (setter)NULL, Matrix_row_size_doc, NULL},
-	{(char *)"col_size", (getter)Matrix_col_size_get, (setter)NULL, Matrix_col_size_doc, NULL},
 	{(char *)"median_scale", (getter)Matrix_median_scale_get, (setter)NULL, Matrix_median_scale_doc, NULL},
 	{(char *)"translation", (getter)Matrix_translation_get, (setter)Matrix_translation_set, Matrix_translation_doc, NULL},
 	{(char *)"row", (getter)Matrix_row_get, (setter)NULL, Matrix_row_doc, NULL},




More information about the Bf-blender-cvs mailing list