diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2004-03-29 12:16:18 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2004-03-29 12:16:18 +0400 |
commit | f3feb77918142cbff73536b40568997482f0846b (patch) | |
tree | a257a2d77ff081202006235590fa6a78d8b248e2 /source/blender/python/api2_2x/bpy_types.h | |
parent | 0a6d0e62e16de88712cd5770b946bd6d7ff004b1 (diff) |
General housekeeping and cleanup. Move static declarations and
data definitions from .h files into corresponding .c files.
Blame zr for this since he's the one who pointed out that our
bpy headers were a mish-mash of stuff that belonged in the .c files!
In a nutshell, the headers should contain the declarations necessary
to use a module or class. The implementation files ( .c in this case )
should contain statements that allocate storage ( definitions in
the C sense ) and executable code.
When used at file scope, the keyword 'static' means "don't tell
anyone else about this". Since headers describe a public
interface, static declarations and definitions belong in the
implementation files.
The net result of all this is that after stuff has moved out
into the .c files, the .h files are empty or mostly empty.
I didn't delete them since there seem to be some public
declarations and because I did not want to cause too much
disruption at one time. Time enough for that later!
Diffstat (limited to 'source/blender/python/api2_2x/bpy_types.h')
-rw-r--r-- | source/blender/python/api2_2x/bpy_types.h | 122 |
1 files changed, 64 insertions, 58 deletions
diff --git a/source/blender/python/api2_2x/bpy_types.h b/source/blender/python/api2_2x/bpy_types.h index f8dae9f438b..4e02eba6b1c 100644 --- a/source/blender/python/api2_2x/bpy_types.h +++ b/source/blender/python/api2_2x/bpy_types.h @@ -42,7 +42,7 @@ #include <DNA_curve_types.h> #include <DNA_world_types.h> -#include "rgbTuple.h" /* for BPy_rgbTuple */ +#include "rgbTuple.h" /* for BPy_rgbTuple */ /*****************************************************************************/ /* Camera Data */ @@ -50,15 +50,16 @@ extern PyTypeObject Camera_Type; #define BPy_Camera_Check(v) \ - ((v)->ob_type == &Camera_Type) /* for type checking */ + ((v)->ob_type == &Camera_Type) /* for type checking */ /* Python BPy_Camera structure definition */ -typedef struct { - PyObject_HEAD - Camera *camera; +typedef struct +{ + PyObject_HEAD /* required py macro */ + Camera * camera; -} BPy_Camera; -/**/ +} +BPy_Camera; /*****************************************************************************/ /* Lamp Data */ @@ -66,31 +67,31 @@ typedef struct { extern PyTypeObject Lamp_Type; #define BPy_Lamp_Check(v) \ - ((v)->ob_type == &Lamp_Type) /* for type checking */ + ((v)->ob_type == &Lamp_Type) /* for type checking */ /* Python BPy_Lamp structure definition */ -typedef struct { - PyObject_HEAD - Lamp *lamp; +typedef struct +{ + PyObject_HEAD /* required py macro */ + Lamp * lamp; BPy_rgbTuple *color; -} BPy_Lamp; -/**/ - +} +BPy_Lamp; /*****************************************************************************/ /* Ipo Data */ /*****************************************************************************/ extern PyTypeObject Ipo_Type; -#define BPy_Ipo_Check(v) ((v)->ob_type == &Ipo_Type) /* for type checking */ +#define BPy_Ipo_Check(v) ((v)->ob_type == &Ipo_Type) /* for type checking */ /* Python BPy_Ipo structure definition */ -typedef struct { - PyObject_HEAD - Ipo *ipo; -} BPy_Ipo; -/**/ - +typedef struct +{ + PyObject_HEAD /* required py macro */ + Ipo * ipo; +} +BPy_Ipo; /*****************************************************************************/ /* Metaball Data */ @@ -100,12 +101,12 @@ extern PyTypeObject Metaball_Type; #define BPy_Metaball_Check(v) ((v)->ob_type==&Metaball_Type) /* Python BPy_Metaball structure definition */ -typedef struct { - PyObject_HEAD - MetaBall *metaball; -} BPy_Metaball; -/**/ - +typedef struct +{ + PyObject_HEAD /* required py macro */ + MetaBall * metaball; +} +BPy_Metaball; /*****************************************************************************/ /* Effect Data */ @@ -115,11 +116,12 @@ extern PyTypeObject Effect_Type; #define BPy_Effect_Check(v) ((v)->ob_type==&Effect_Type) /* Python BPy_Effect structure definition */ -typedef struct { - PyObject_HEAD - Effect *effect; -} BPy_Effect; -/**/ +typedef struct +{ + PyObject_HEAD /* required py macro */ + Effect * effect; +} +BPy_Effect; /*****************************************************************************/ /* Wave Data */ @@ -129,11 +131,12 @@ extern PyTypeObject Wave_Type; #define BPy_Wave_Check(v) ((v)->ob_type==&Wave_Type) /* Python BPy_Wave structure definition */ -typedef struct { - PyObject_HEAD - Effect *wave; -} BPy_Wave; -/**/ +typedef struct +{ + PyObject_HEAD /* required py macro */ + Effect * wave; +} +BPy_Wave; /*****************************************************************************/ /* Build Data */ @@ -143,11 +146,12 @@ extern PyTypeObject Build_Type; #define BPy_Build_Check(v) ((v)->ob_type==&Build_Type) /* Python BPy_Build structure definition */ -typedef struct { - PyObject_HEAD - Effect *build; -} BPy_Build; -/**/ +typedef struct +{ + PyObject_HEAD /* required py macro */ + Effect * build; +} +BPy_Build; /*****************************************************************************/ /* Particle Data */ @@ -157,11 +161,12 @@ extern PyTypeObject Particle_Type; #define BPy_Particle_Check(v) ((v)->ob_type==&Particle_Type) /* Python BPy_Particle structure definition */ -typedef struct { - PyObject_HEAD - Effect *particle; -} BPy_Particle; -/**/ +typedef struct +{ + PyObject_HEAD /* required py macro */ + Effect * particle; +} +BPy_Particle; /*****************************************************************************/ /* Curve Data */ @@ -171,11 +176,12 @@ extern PyTypeObject Curve_Type; #define BPy_Curve_Check(v) ((v)->ob_type==&Curve_Type) /* Python BPy_Curve structure definition */ -typedef struct { - PyObject_HEAD - Curve *curve; -} BPy_Curve; -/**/ +typedef struct +{ + PyObject_HEAD /* required py macro */ + Curve * curve; +} +BPy_Curve; /*****************************************************************************/ /* World Data */ @@ -185,11 +191,11 @@ extern PyTypeObject World_Type; #define BPy_World_Check(v) ((v)->ob_type==&World_Type) /* Python BPy_World structure definition */ -typedef struct { - PyObject_HEAD - World *world; -} BPy_World; -/**/ - +typedef struct +{ + PyObject_HEAD /* required py macro */ + World * world; +} +BPy_World; #endif /* EXPP_bpy_types_h */ |