diff options
author | Ken Hughes <khughes@pacific.edu> | 2006-05-22 18:19:52 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2006-05-22 18:19:52 +0400 |
commit | 677cf7f1333c634a52227a15d6dcb3351b39febc (patch) | |
tree | 9fbc5d0084bf851013919fca46e799ee0f52d48b /source/blender/python/api2_2x/NLA.h | |
parent | a849ba81893ec5a9782225b0a1e92725b2ed59e4 (diff) |
===Python API===
Adding support for Action Strips to the API. A new attribute "actionStrips"
has been added to the Object API to access them.
Diffstat (limited to 'source/blender/python/api2_2x/NLA.h')
-rw-r--r-- | source/blender/python/api2_2x/NLA.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/NLA.h b/source/blender/python/api2_2x/NLA.h index 07632124bba..219e2f0aa8d 100644 --- a/source/blender/python/api2_2x/NLA.h +++ b/source/blender/python/api2_2x/NLA.h @@ -25,7 +25,7 @@ * * This is a new part of Blender. * - * Contributor(s): Joseph Gilbert + * Contributor(s): Joseph Gilbert, Ken Hughes * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ @@ -35,11 +35,16 @@ #include <Python.h> #include "DNA_action_types.h" +#include "DNA_nla_types.h" + +struct Object; /** NLA module initialization function. */ PyObject *NLA_Init( void ); extern PyTypeObject Action_Type; +extern PyTypeObject ActionStrip_Type; +extern PyTypeObject ActionStrips_Type; /** Python BPy_NLA structure definition. */ typedef struct { @@ -47,8 +52,27 @@ typedef struct { bAction * action; } BPy_Action; +typedef struct { + PyObject_HEAD + bActionStrip * strip; +} BPy_ActionStrip; + +typedef struct { + PyObject_HEAD + struct Object * ob; + struct bActionStrip *iter; +} BPy_ActionStrips; + +/* Type checking for EXPP PyTypes */ +#define BPy_Action_Check(v) ((v)->ob_type == &Action_Type) +#define BPy_ActionStrip_Check(v) ((v)->ob_type == &ActionStrip_Type) +#define BPy_ActionStrips_Check(v) ((v)->ob_type == &ActionStrips_Type) + PyObject *Action_CreatePyObject( struct bAction *action ); int Action_CheckPyObject( PyObject * py_obj ); bAction *Action_FromPyObject( PyObject * py_obj ); +PyObject *ActionStrip_CreatePyObject( struct bActionStrip *strip ); +PyObject *ActionStrips_CreatePyObject( struct Object *ob ); + #endif |