diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-30 04:42:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-30 04:42:17 +0400 |
commit | f60760e2e2922a9e600cc67cafbb2e61869e4bb4 (patch) | |
tree | 029659de447affc1b17edab222de8ec59f0212e2 /source/blender/python/generic/matrix.h | |
parent | da32a0594b80aa5f980e17f446eb2d20c76272c5 (diff) |
Python API
Mathutils support for subclassing Vector, Quat, Euler and Matrix types.
Removed C docstrings, prefer to make sure our epydocs are well maintained rather then duplicate, vague doc strings.
Will convert scripts to detect missing docs from the BGE.
Diffstat (limited to 'source/blender/python/generic/matrix.h')
-rw-r--r-- | source/blender/python/generic/matrix.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/python/generic/matrix.h b/source/blender/python/generic/matrix.h index 4b073668969..856c711c4ef 100644 --- a/source/blender/python/generic/matrix.h +++ b/source/blender/python/generic/matrix.h @@ -33,8 +33,7 @@ #include <Python.h> extern PyTypeObject matrix_Type; - -#define MatrixObject_Check(v) ((v)->ob_type == &matrix_Type) +#define MatrixObject_Check(_v) PyObject_TypeCheck((_v), &matrix_Type) typedef float **ptRow; typedef struct _Matrix { /* keep aligned with BaseMathObject in Mathutils.h */ @@ -58,7 +57,7 @@ be stored in py_data) or be a wrapper for data allocated through blender (stored in blend_data). This is an either/or struct not both*/ /*prototypes*/ -PyObject *newMatrixObject(float *mat, int rowSize, int colSize, int type); +PyObject *newMatrixObject(float *mat, int rowSize, int colSize, int type, PyTypeObject *base_type); PyObject *newMatrixObject_cb(PyObject *user, int rowSize, int colSize, int cb_type, int cb_subtype); extern int mathutils_matrix_vector_cb_index; |