diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-10 22:09:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-10 22:09:53 +0400 |
commit | 64f300ccf4ffa687b196b111b91682d8a50d0069 (patch) | |
tree | 2d1993b9b2dc98bb0ec3c1c56e83677505cf4010 /source/blender/python/generic/Mathutils.h | |
parent | b3d6b2f7283e200e3b3724cc93c8279fe7b4dcf0 (diff) |
Use python subtypes so bpy.types.Mesh is a subtype of bpy.types.ID
This means checks like this work.
isinstance(bpy.data.meshes[0], bpy.types.ID)
bpy.types.Mesh.__base__ == bpy.types.ID
Diffstat (limited to 'source/blender/python/generic/Mathutils.h')
-rw-r--r-- | source/blender/python/generic/Mathutils.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/generic/Mathutils.h b/source/blender/python/generic/Mathutils.h index 6a4e28d6068..5bdd9d9cfe0 100644 --- a/source/blender/python/generic/Mathutils.h +++ b/source/blender/python/generic/Mathutils.h @@ -85,6 +85,13 @@ int EXPP_VectorsAreEqual(float *vecA, float *vecB, int size, int floatSteps); #endif typedef struct Mathutils_Callback Mathutils_Callback; + +typedef int (*BaseMathCheckFunc)(PyObject *); +typedef int (*BaseMathGetFunc)(PyObject *, int, float *); +typedef int (*BaseMathSetFunc)(PyObject *, int, float *); +typedef int (*BaseMathGetIndexFunc)(PyObject *, int, float *, int); +typedef int (*BaseMathSetIndexFunc)(PyObject *, int, float *, int); + struct Mathutils_Callback { int (*check)(PyObject *user); /* checks the user is still valid */ int (*get)(PyObject *user, int subtype, float *from); /* gets the vector from the user */ |