diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 11:03:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 11:03:19 +0400 |
commit | 2a803680054506fd0e1edec73fa4f184df3a3bc8 (patch) | |
tree | 84966f7f8f1dc93a37d93aed51566b756d3faa00 /source/blender/python/mathutils/mathutils_Matrix.h | |
parent | 28a5549ecf2a3c7614bfe1df58d658e5fd65de3b (diff) |
mathtils, convenience attributes added 'row' and 'col', this makes the row/col swap a lot easier to deal with, since
now you can still use column access
previously...
mat[2] = 1, 2, 3
needed to be converted into...
mat[0][2] = 1
mat[1][2] = 2
mat[2][2] = 3
but with column access you can do...
mat.col[2] = 1, 2, 3
Having 'row' attribute is a bit redundant since direct indexing on a matrix uses row but included for completeness.
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Matrix.h')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Matrix.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/python/mathutils/mathutils_Matrix.h b/source/blender/python/mathutils/mathutils_Matrix.h index 73b786ef6aa..7602f98dea4 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.h +++ b/source/blender/python/mathutils/mathutils_Matrix.h @@ -35,6 +35,7 @@ #define MATHUTILS_MATRIX_H extern PyTypeObject matrix_Type; +extern PyTypeObject matrix_access_Type; #define MatrixObject_Check(_v) PyObject_TypeCheck((_v), &matrix_Type) #define MATRIX_MAX_DIM 4 |