Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/mathutils/mathutils_Matrix.c
| Show First 20 Lines • Show All 2,586 Lines • ▼ Show 20 Lines | static int Matrix_translation_set(MatrixObject *self, PyObject *value, void *UNUSED(closure)) | ||||
| copy_v3_v3(((float (*)[4])self->matrix)[3], tvec); | copy_v3_v3(((float (*)[4])self->matrix)[3], tvec); | ||||
| (void)BaseMath_WriteCallback(self); | (void)BaseMath_WriteCallback(self); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| PyDoc_STRVAR(Matrix_row_doc, | PyDoc_STRVAR(Matrix_row_doc, | ||||
| "Access the matix by rows (default), (read-only).\n\n:type: Matrix Access" | "Access the matrix by rows (default), (read-only).\n\n:type: Matrix Access" | ||||
| ); | ); | ||||
| static PyObject *Matrix_row_get(MatrixObject *self, void *UNUSED(closure)) | static PyObject *Matrix_row_get(MatrixObject *self, void *UNUSED(closure)) | ||||
| { | { | ||||
| return MatrixAccess_CreatePyObject(self, MAT_ACCESS_ROW); | return MatrixAccess_CreatePyObject(self, MAT_ACCESS_ROW); | ||||
| } | } | ||||
| PyDoc_STRVAR(Matrix_col_doc, | PyDoc_STRVAR(Matrix_col_doc, | ||||
| "Access the matix by colums, 3x3 and 4x4 only, (read-only).\n\n:type: Matrix Access" | "Access the matrix by columns, 3x3 and 4x4 only, (read-only).\n\n:type: Matrix Access" | ||||
| ); | ); | ||||
| static PyObject *Matrix_col_get(MatrixObject *self, void *UNUSED(closure)) | static PyObject *Matrix_col_get(MatrixObject *self, void *UNUSED(closure)) | ||||
| { | { | ||||
| return MatrixAccess_CreatePyObject(self, MAT_ACCESS_COL); | return MatrixAccess_CreatePyObject(self, MAT_ACCESS_COL); | ||||
| } | } | ||||
| PyDoc_STRVAR(Matrix_median_scale_doc, | PyDoc_STRVAR(Matrix_median_scale_doc, | ||||
| "The average scale applied to each axis (read-only).\n\n:type: float" | "The average scale applied to each axis (read-only).\n\n:type: float" | ||||
| ▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | |||||
| /*------------------PY_OBECT DEFINITION--------------------------*/ | /*------------------PY_OBECT DEFINITION--------------------------*/ | ||||
| PyDoc_STRVAR(matrix_doc, | PyDoc_STRVAR(matrix_doc, | ||||
| ".. class:: Matrix([rows])\n" | ".. class:: Matrix([rows])\n" | ||||
| "\n" | "\n" | ||||
| " This object gives access to Matrices in Blender, supporting square and rectangular\n" | " This object gives access to Matrices in Blender, supporting square and rectangular\n" | ||||
| " matrices from 2x2 up to 4x4.\n" | " matrices from 2x2 up to 4x4.\n" | ||||
| "\n" | "\n" | ||||
| " :param rows: Sequence of rows.\n" | " :param rows: Sequence of rows.\n" | ||||
| " When ommitted, a 4x4 identity matrix is constructed.\n" | " When omitted, a 4x4 identity matrix is constructed.\n" | ||||
| " :type rows: 2d number sequence\n" | " :type rows: 2d number sequence\n" | ||||
| ); | ); | ||||
| PyTypeObject matrix_Type = { | PyTypeObject matrix_Type = { | ||||
| PyVarObject_HEAD_INIT(NULL, 0) | PyVarObject_HEAD_INIT(NULL, 0) | ||||
| "Matrix", /*tp_name*/ | "Matrix", /*tp_name*/ | ||||
| sizeof(MatrixObject), /*tp_basicsize*/ | sizeof(MatrixObject), /*tp_basicsize*/ | ||||
| 0, /*tp_itemsize*/ | 0, /*tp_itemsize*/ | ||||
| (destructor)BaseMathObject_dealloc, /*tp_dealloc*/ | (destructor)BaseMathObject_dealloc, /*tp_dealloc*/ | ||||
| ▲ Show 20 Lines • Show All 428 Lines • Show Last 20 Lines | |||||