Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/python/api2_2x/Armature.c7
-rw-r--r--source/blender/python/api2_2x/Armature.h5
-rw-r--r--source/blender/python/api2_2x/BezTriple.c10
-rw-r--r--source/blender/python/api2_2x/BezTriple.h1
-rw-r--r--source/blender/python/api2_2x/Camera.c5
-rw-r--r--source/blender/python/api2_2x/Camera.h1
-rw-r--r--source/blender/python/api2_2x/Constraint.c12
-rw-r--r--source/blender/python/api2_2x/Constraint.h1
-rw-r--r--source/blender/python/api2_2x/CurNurb.c13
-rw-r--r--source/blender/python/api2_2x/CurNurb.h1
-rw-r--r--source/blender/python/api2_2x/Curve.c12
-rw-r--r--source/blender/python/api2_2x/Curve.h1
-rw-r--r--source/blender/python/api2_2x/Draw.c2
-rw-r--r--source/blender/python/api2_2x/Font.c6
-rw-r--r--source/blender/python/api2_2x/Font.h1
-rwxr-xr-xsource/blender/python/api2_2x/Group.c10
-rwxr-xr-xsource/blender/python/api2_2x/Group.h1
-rw-r--r--source/blender/python/api2_2x/Image.c10
-rw-r--r--source/blender/python/api2_2x/Image.h1
-rw-r--r--source/blender/python/api2_2x/Ipo.c10
-rw-r--r--source/blender/python/api2_2x/Ipo.h1
-rw-r--r--source/blender/python/api2_2x/Ipocurve.c10
-rw-r--r--source/blender/python/api2_2x/Ipocurve.h1
-rw-r--r--source/blender/python/api2_2x/Lamp.c10
-rw-r--r--source/blender/python/api2_2x/Lamp.h1
-rw-r--r--source/blender/python/api2_2x/Lattice.c8
-rw-r--r--source/blender/python/api2_2x/Lattice.h3
-rw-r--r--source/blender/python/api2_2x/MTex.c7
-rw-r--r--source/blender/python/api2_2x/MTex.h1
-rw-r--r--source/blender/python/api2_2x/Main.c4
-rw-r--r--source/blender/python/api2_2x/Material.c12
-rw-r--r--source/blender/python/api2_2x/Material.h1
-rw-r--r--source/blender/python/api2_2x/Mesh.c6
-rw-r--r--source/blender/python/api2_2x/Mesh.h1
-rw-r--r--source/blender/python/api2_2x/Metaball.c8
-rw-r--r--source/blender/python/api2_2x/Metaball.h1
-rw-r--r--source/blender/python/api2_2x/Modifier.c10
-rw-r--r--source/blender/python/api2_2x/Modifier.h1
-rw-r--r--source/blender/python/api2_2x/NLA.c6
-rw-r--r--source/blender/python/api2_2x/NLA.h1
-rw-r--r--source/blender/python/api2_2x/NMesh.c7
-rw-r--r--source/blender/python/api2_2x/NMesh.h2
-rw-r--r--source/blender/python/api2_2x/Object.c34
-rw-r--r--source/blender/python/api2_2x/Object.h1
-rw-r--r--source/blender/python/api2_2x/Pose.h6
-rw-r--r--source/blender/python/api2_2x/Scene.c24
-rw-r--r--source/blender/python/api2_2x/Scene.h1
-rw-r--r--source/blender/python/api2_2x/Sound.c10
-rw-r--r--source/blender/python/api2_2x/Sound.h1
-rw-r--r--source/blender/python/api2_2x/SurfNurb.c16
-rw-r--r--source/blender/python/api2_2x/SurfNurb.h1
-rw-r--r--source/blender/python/api2_2x/Text3d.c6
-rw-r--r--source/blender/python/api2_2x/Text3d.h3
-rw-r--r--source/blender/python/api2_2x/Texture.c7
-rw-r--r--source/blender/python/api2_2x/Texture.h1
-rw-r--r--source/blender/python/api2_2x/World.c6
-rw-r--r--source/blender/python/api2_2x/World.h1
-rw-r--r--source/blender/python/api2_2x/logic.c6
-rw-r--r--source/blender/python/api2_2x/logic.h3
-rw-r--r--source/blender/python/api2_2x/sceneRadio.c5
-rw-r--r--source/blender/python/api2_2x/sceneRadio.h1
-rw-r--r--source/blender/python/api2_2x/sceneRender.c5
-rw-r--r--source/blender/python/api2_2x/sceneRender.h3
-rw-r--r--source/blender/python/api2_2x/sceneSequence.c17
-rw-r--r--source/blender/python/api2_2x/sceneSequence.h2
-rw-r--r--source/blender/python/api2_2x/sceneTimeLine.h1
66 files changed, 54 insertions, 319 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c
index 42f968e3e89..2603ad0c1ac 100644
--- a/source/blender/python/api2_2x/Armature.c
+++ b/source/blender/python/api2_2x/Armature.c
@@ -1341,13 +1341,6 @@ struct bArmature *PyArmature_AsArmature(BPy_Armature *py_armature)
return (py_armature->armature);
}
-// This function returns true when the given PyObject
-// is of the type Sound. Otherwise it will return false
-int Armature_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Armature_Type);
-}
-
struct bArmature *Armature_FromPyObject( PyObject * py_obj )
{
return PyArmature_AsArmature((BPy_Armature*)py_obj);
diff --git a/source/blender/python/api2_2x/Armature.h b/source/blender/python/api2_2x/Armature.h
index c441bdc5f83..7f543e375a1 100644
--- a/source/blender/python/api2_2x/Armature.h
+++ b/source/blender/python/api2_2x/Armature.h
@@ -35,8 +35,8 @@
#include "DNA_armature_types.h"
//-------------------TYPE CHECKS---------------------------------
-#define ArmatureObject_Check(v) ((v)->ob_type == &Armature_Type)
-#define BonesDictObject_Check(v) ((v)->ob_type == &BonesDict_Type)
+#define BPy_Armature_Check(v) ((v)->ob_type == &Armature_Type)
+#define BPy_BonesDict_Check(v) ((v)->ob_type == &BonesDict_Type)
//-------------------MODULE INIT---------------------------------
PyObject *Armature_Init( void );
//-------------------TYPEOBJECT----------------------------------
@@ -65,7 +65,6 @@ struct bArmature *PyArmature_AsArmature(BPy_Armature *py_armature);
PyObject * Armature_RebuildEditbones(PyObject *pyarmature);
PyObject *Armature_RebuildBones(PyObject *pyarmature);
-int Armature_CheckPyObject( PyObject * pyobj );
struct bArmature *Armature_FromPyObject( PyObject * py_obj );
#endif
diff --git a/source/blender/python/api2_2x/BezTriple.c b/source/blender/python/api2_2x/BezTriple.c
index 86a4139679f..aabc33e6f95 100644
--- a/source/blender/python/api2_2x/BezTriple.c
+++ b/source/blender/python/api2_2x/BezTriple.c
@@ -646,16 +646,6 @@ PyObject *BezTriple_CreatePyObject( BezTriple * bzt )
/*****************************************************************************/
-/* Function: BezTriple_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type BezTriple. Otherwise it will return false. */
-/*****************************************************************************/
-int BezTriple_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &BezTriple_Type );
-}
-
-/*****************************************************************************/
/* Function: BezTriple_FromPyObject */
/* Description: This function returns the Blender beztriple from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/BezTriple.h b/source/blender/python/api2_2x/BezTriple.h
index a4e9b2e2db3..e2e015b502d 100644
--- a/source/blender/python/api2_2x/BezTriple.h
+++ b/source/blender/python/api2_2x/BezTriple.h
@@ -57,7 +57,6 @@ typedef struct {
*/
PyObject *BezTriple_CreatePyObject( BezTriple * bzt );
-int BezTriple_CheckPyObject( PyObject * pyobj );
BezTriple *BezTriple_FromPyObject( PyObject * pyobj );
PyObject *newBezTriple( float *args );
PyObject *BezTriple_Init( void );
diff --git a/source/blender/python/api2_2x/Camera.c b/source/blender/python/api2_2x/Camera.c
index 96212956a63..2ec89de1c7b 100644
--- a/source/blender/python/api2_2x/Camera.c
+++ b/source/blender/python/api2_2x/Camera.c
@@ -350,11 +350,6 @@ PyObject *Camera_CreatePyObject( Camera * cam )
return ( PyObject * ) pycam;
}
-int Camera_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Camera_Type );
-}
-
Camera *Camera_FromPyObject( PyObject * pyobj )
{
return ( ( BPy_Camera * ) pyobj )->camera;
diff --git a/source/blender/python/api2_2x/Camera.h b/source/blender/python/api2_2x/Camera.h
index c6c25215457..c92e51c1468 100644
--- a/source/blender/python/api2_2x/Camera.h
+++ b/source/blender/python/api2_2x/Camera.h
@@ -77,7 +77,6 @@ typedef struct {
PyObject *Camera_Init( void );
PyObject *Camera_CreatePyObject( Camera * cam );
-int Camera_CheckPyObject( PyObject * pyobj );
Camera *Camera_FromPyObject( PyObject * pyobj );
#endif /* EXPP_CAMERA_H */
diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c
index d95a2e1e9a9..d67557084a1 100644
--- a/source/blender/python/api2_2x/Constraint.c
+++ b/source/blender/python/api2_2x/Constraint.c
@@ -531,7 +531,7 @@ static int action_setter( BPy_Constraint *self, int type, PyObject *value )
}
case EXPP_CONSTR_ACTION: {
bAction *act = (( BPy_Action * )value)->action;
- if( !Action_CheckPyObject( value ) )
+ if( !BPy_Action_Check( value ) )
return EXPP_ReturnIntError( PyExc_TypeError,
"expected BPy action argument" );
con->act = act;
@@ -1482,16 +1482,6 @@ PyObject *Constraint_CreatePyObject( bPoseChannel *pchan, Object *obj,
}
/*****************************************************************************/
-/* Function: Constraint_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Constraint. Otherwise it will return false. */
-/*****************************************************************************/
-int Constraint_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Constraint_Type );
-}
-
-/*****************************************************************************/
/* Function: Constraint_FromPyObject */
/* Description: This function returns the Blender constraint from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/Constraint.h b/source/blender/python/api2_2x/Constraint.h
index c0b07a17697..116eabbf380 100644
--- a/source/blender/python/api2_2x/Constraint.h
+++ b/source/blender/python/api2_2x/Constraint.h
@@ -69,7 +69,6 @@ PyObject *Constraint_Init( void );
PyObject *Constraint_CreatePyObject( bPoseChannel *pchan, Object *obj,
bConstraint *con );
bConstraint *Constraint_FromPyObject( BPy_Constraint * obj );
-int Constraint_CheckPyObject( PyObject * py_obj );
PyObject *PoseConstraintSeq_CreatePyObject( bPoseChannel *pchan );
PyObject *ObConstraintSeq_CreatePyObject( Object *obj );
diff --git a/source/blender/python/api2_2x/CurNurb.c b/source/blender/python/api2_2x/CurNurb.c
index b5f7e8727f5..da551307d83 100644
--- a/source/blender/python/api2_2x/CurNurb.c
+++ b/source/blender/python/api2_2x/CurNurb.c
@@ -475,7 +475,7 @@ PyObject *CurNurb_appendPointToNurb( Nurb * nurb, PyObject * args )
/* if curve is empty, adjust type depending on input type */
if (nurb->bezt==NULL && nurb->bp==NULL) {
- if (BezTriple_CheckPyObject( pyOb ))
+ if (BPy_BezTriple_Check( pyOb ))
nurb->type |= CU_BEZIER;
else if (PySequence_Check( pyOb ))
nurb->type |= CU_NURBS;
@@ -489,7 +489,7 @@ PyObject *CurNurb_appendPointToNurb( Nurb * nurb, PyObject * args )
if ((nurb->type & 7)==CU_BEZIER) {
BezTriple *tmp;
- if( !BezTriple_CheckPyObject( pyOb ) )
+ if( !BPy_BezTriple_Check( pyOb ) )
return( EXPP_ReturnPyObjError( PyExc_TypeError,
"Expected a BezTriple\n" ) );
@@ -810,7 +810,7 @@ static int CurNurb_length( PyInstanceObject * inst )
Nurb *nurb;
int len;
- if( CurNurb_CheckPyObject( ( PyObject * ) inst ) ) {
+ if( BPy_CurNurb_Check( ( PyObject * ) inst ) ) {
nurb = ( ( BPy_CurNurb * ) inst )->nurb;
len = nurb->pntsu;
return len;
@@ -880,7 +880,7 @@ static int CurNurb_setPoint( BPy_CurNurb * self, int index, PyObject * pyOb )
/* branch by curve type */
if ((nurb->type & 7)==CU_BEZIER) { /* BEZIER */
/* check parameter type */
- if( !BezTriple_CheckPyObject( pyOb ) )
+ if( !BPy_BezTriple_Check( pyOb ) )
return EXPP_ReturnIntError( PyExc_TypeError,
"expected a BezTriple" );
@@ -1064,11 +1064,6 @@ PyObject *CurNurb_switchDirection( BPy_CurNurb * self )
Py_RETURN_NONE;
}
-int CurNurb_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &CurNurb_Type );
-}
-
PyObject *CurNurb_Init( void )
{
if( PyType_Ready( &CurNurb_Type ) < 0)
diff --git a/source/blender/python/api2_2x/CurNurb.h b/source/blender/python/api2_2x/CurNurb.h
index 763d4ae5f30..06dbf7190ac 100644
--- a/source/blender/python/api2_2x/CurNurb.h
+++ b/source/blender/python/api2_2x/CurNurb.h
@@ -60,7 +60,6 @@ typedef struct {
PyObject *CurNurb_Init( void );
PyObject *CurNurb_CreatePyObject( Nurb * bzt );
-int CurNurb_CheckPyObject( PyObject * pyobj );
Nurb *CurNurb_FromPyObject( PyObject * pyobj );
PyObject *CurNurb_getPoint( BPy_CurNurb * self, int index );
diff --git a/source/blender/python/api2_2x/Curve.c b/source/blender/python/api2_2x/Curve.c
index c74afd29604..d32fac3139f 100644
--- a/source/blender/python/api2_2x/Curve.c
+++ b/source/blender/python/api2_2x/Curve.c
@@ -1039,7 +1039,7 @@ static PyObject *Curve_getBevOb( BPy_Curve * self)
static int Curve_newsetBevOb( BPy_Curve * self, PyObject * args )
{
- if (Object_CheckPyObject( args ) && ((BPy_Object *)args)->object->data == self->curve )
+ if (BPy_Object_Check( args ) && ((BPy_Object *)args)->object->data == self->curve )
return EXPP_ReturnIntError( PyExc_ValueError,
"Can't bevel an object to itself" );
@@ -1066,7 +1066,7 @@ static PyObject *Curve_getTaperOb( BPy_Curve * self)
static int Curve_newsetTaperOb( BPy_Curve * self, PyObject * args )
{
- if (Object_CheckPyObject( args ) && ((BPy_Object *)args)->object->data == self->curve )
+ if (BPy_Object_Check( args ) && ((BPy_Object *)args)->object->data == self->curve )
return EXPP_ReturnIntError( PyExc_ValueError,
"Can't taper an object to itself" );
@@ -1160,7 +1160,7 @@ static PyObject *Curve_iterNext( BPy_Curve * self )
static int Curve_length( PyInstanceObject * inst )
{
- if( Curve_CheckPyObject( ( PyObject * ) inst ) )
+ if( BPy_Curve_Check( ( PyObject * ) inst ) )
return ( ( int ) PyInt_AsLong
( Curve_getNumCurves( ( BPy_Curve * ) inst ) ) );
@@ -1663,12 +1663,6 @@ PyObject *Curve_CreatePyObject( struct Curve * curve )
}
-int Curve_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &Curve_Type );
-}
-
-
struct Curve *Curve_FromPyObject( PyObject * py_obj )
{
BPy_Curve *blen_obj;
diff --git a/source/blender/python/api2_2x/Curve.h b/source/blender/python/api2_2x/Curve.h
index 8fdf76781dc..70be37500f1 100644
--- a/source/blender/python/api2_2x/Curve.h
+++ b/source/blender/python/api2_2x/Curve.h
@@ -55,7 +55,6 @@ typedef struct {
PyObject *Curve_Init( void );
PyObject *Curve_CreatePyObject( struct Curve * curve );
-int Curve_CheckPyObject( PyObject * py_obj );
struct Curve *Curve_FromPyObject( PyObject * py_obj );
PyObject *Curve_update( BPy_Curve * self );
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c
index c8713c8c0f1..8f557410481 100644
--- a/source/blender/python/api2_2x/Draw.c
+++ b/source/blender/python/api2_2x/Draw.c
@@ -1709,7 +1709,7 @@ static PyObject *Method_Image( PyObject * self, PyObject * args )
"expected a Blender.Image and 2 floats, and " \
"optionally 2 floats and 4 ints as arguments" );
/* check that the first PyObject is actually a Blender.Image */
- if( !Image_CheckPyObject( pyObjImage ) )
+ if( !BPy_Image_Check( pyObjImage ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected a Blender.Image and 2 floats, and " \
"optionally 2 floats and 4 ints as arguments" );
diff --git a/source/blender/python/api2_2x/Font.c b/source/blender/python/api2_2x/Font.c
index 1d2a1e58bd4..2603326a68d 100644
--- a/source/blender/python/api2_2x/Font.c
+++ b/source/blender/python/api2_2x/Font.c
@@ -402,12 +402,6 @@ PyObject *Font_CreatePyObject( struct VFont * font )
return ( ( PyObject * ) blen_font );
}
-/*--------------- Font_CheckPyObject--------------------------------*/
-int Font_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &Font_Type );
-}
-
/*--------------- Font_FromPyObject---------------------------------*/
struct VFont *Font_FromPyObject( PyObject * py_obj )
{
diff --git a/source/blender/python/api2_2x/Font.h b/source/blender/python/api2_2x/Font.h
index 097cbd47416..c1a1ec73fe2 100644
--- a/source/blender/python/api2_2x/Font.h
+++ b/source/blender/python/api2_2x/Font.h
@@ -45,7 +45,6 @@ typedef struct {
/*------------------------------visible prototypes----------------------*/
PyObject *Font_CreatePyObject( struct VFont * font );
-int Font_CheckPyObject( PyObject * py_obj );
struct VFont *Font_FromPyObject( PyObject * py_obj );
PyObject *Font_Init( void );
diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c
index f52afacdebf..b785c58df3a 100755
--- a/source/blender/python/api2_2x/Group.c
+++ b/source/blender/python/api2_2x/Group.c
@@ -515,16 +515,6 @@ PyObject *Group_CreatePyObject( struct Group * grp )
}
/*****************************************************************************/
-/* Function: Group_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Group. Otherwise it will return false. */
-/*****************************************************************************/
-int Group_CheckPyObject( PyObject * py_grp)
-{
- return ( py_grp->ob_type == &Group_Type );
-}
-
-/*****************************************************************************/
/* Function: Group_FromPyObject */
/* Description: This function returns the Blender group from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/Group.h b/source/blender/python/api2_2x/Group.h
index c20a6bb11c9..0512623b5f8 100755
--- a/source/blender/python/api2_2x/Group.h
+++ b/source/blender/python/api2_2x/Group.h
@@ -62,6 +62,5 @@ typedef struct {
PyObject *Group_Init( void );
PyObject *Group_CreatePyObject( struct Group *group );
Group *Group_FromPyObject( PyObject * py_obj );
-int Group_CheckPyObject( PyObject * py_obj );
#endif /* EXPP_GROUP_H */
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c
index 18640ce6f7c..a030f635010 100644
--- a/source/blender/python/api2_2x/Image.c
+++ b/source/blender/python/api2_2x/Image.c
@@ -782,16 +782,6 @@ PyObject *Image_CreatePyObject( Image * image )
}
/*****************************************************************************/
-/* Function: Image_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Image. Otherwise it will return false. */
-/*****************************************************************************/
-int Image_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Image_Type );
-}
-
-/*****************************************************************************/
/* Function: Image_FromPyObject */
/* Description: Returns the Blender Image associated with this object */
/*****************************************************************************/
diff --git a/source/blender/python/api2_2x/Image.h b/source/blender/python/api2_2x/Image.h
index e5955e4df2e..a36627cb236 100644
--- a/source/blender/python/api2_2x/Image.h
+++ b/source/blender/python/api2_2x/Image.h
@@ -55,7 +55,6 @@ extern PyTypeObject Image_Type; /* The Image PyType Object */
/*****************************************************************************/
PyObject *Image_Init( void );
PyObject *Image_CreatePyObject( Image * image );
-int Image_CheckPyObject( PyObject * pyobj );
Image *Image_FromPyObject( PyObject * pyobj );
#endif /* EXPP_IMAGE_H */
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c
index 4c65f31cfe3..674b4e6d3f1 100644
--- a/source/blender/python/api2_2x/Ipo.c
+++ b/source/blender/python/api2_2x/Ipo.c
@@ -1351,16 +1351,6 @@ PyObject *Ipo_CreatePyObject( Ipo * ipo )
}
/*****************************************************************************/
-/* Function: Ipo_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Ipo. Otherwise it will return false. */
-/*****************************************************************************/
-int Ipo_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Ipo_Type );
-}
-
-/*****************************************************************************/
/* Function: Ipo_FromPyObject */
/* Description: This function returns the Blender ipo from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/Ipo.h b/source/blender/python/api2_2x/Ipo.h
index 1be7b6bf54f..d3bf2fd108b 100644
--- a/source/blender/python/api2_2x/Ipo.h
+++ b/source/blender/python/api2_2x/Ipo.h
@@ -58,7 +58,6 @@ extern PyTypeObject Ipo_Type;
PyObject *Ipo_Init( void );
PyObject *Ipo_CreatePyObject( struct Ipo *ipo );
Ipo *Ipo_FromPyObject( PyObject * py_obj );
-int Ipo_CheckPyObject( PyObject * py_obj );
#endif /* EXPP_IPO_H */
diff --git a/source/blender/python/api2_2x/Ipocurve.c b/source/blender/python/api2_2x/Ipocurve.c
index e04a65600c7..5a45d9f3485 100644
--- a/source/blender/python/api2_2x/Ipocurve.c
+++ b/source/blender/python/api2_2x/Ipocurve.c
@@ -705,16 +705,6 @@ PyObject *IpoCurve_CreatePyObject( IpoCurve * icu )
}
/*****************************************************************************/
-/* Function: IpoCurve_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type IpoCurve. Otherwise it will return false. */
-/*****************************************************************************/
-int IpoCurve_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &IpoCurve_Type );
-}
-
-/*****************************************************************************/
/* Function: IpoCurve_FromPyObject */
/* Description: This function returns the Blender ipo from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/Ipocurve.h b/source/blender/python/api2_2x/Ipocurve.h
index 778f468aa7f..c79dc5d35f1 100644
--- a/source/blender/python/api2_2x/Ipocurve.h
+++ b/source/blender/python/api2_2x/Ipocurve.h
@@ -49,7 +49,6 @@ extern PyTypeObject IpoCurve_Type;
PyObject *IpoCurve_Init( void );
PyObject *IpoCurve_CreatePyObject( IpoCurve * ipo );
-int IpoCurve_CheckPyObject( PyObject * pyobj );
IpoCurve *IpoCurve_FromPyObject( PyObject * pyobj );
char *getIpoCurveName( IpoCurve * icu );
diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c
index 4e2638921fc..25bfaf56d8e 100644
--- a/source/blender/python/api2_2x/Lamp.c
+++ b/source/blender/python/api2_2x/Lamp.c
@@ -838,16 +838,6 @@ PyObject *Lamp_CreatePyObject( Lamp * lamp )
}
/*****************************************************************************/
-/* Function: Lamp_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Lamp. Otherwise it will return false. */
-/*****************************************************************************/
-int Lamp_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Lamp_Type );
-}
-
-/*****************************************************************************/
/* Function: Lamp_FromPyObject */
/* Description: This function returns the Blender lamp from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/Lamp.h b/source/blender/python/api2_2x/Lamp.h
index fa31128c3e1..3ad6348a152 100644
--- a/source/blender/python/api2_2x/Lamp.h
+++ b/source/blender/python/api2_2x/Lamp.h
@@ -57,6 +57,5 @@ typedef struct {
PyObject *Lamp_Init( void );
PyObject *Lamp_CreatePyObject( struct Lamp *lamp );
Lamp *Lamp_FromPyObject( PyObject * pyobj );
-int Lamp_CheckPyObject( PyObject * pyobj );
#endif /* EXPP_LAMP_H */
diff --git a/source/blender/python/api2_2x/Lattice.c b/source/blender/python/api2_2x/Lattice.c
index f179839cd68..fe6bd3f500a 100644
--- a/source/blender/python/api2_2x/Lattice.c
+++ b/source/blender/python/api2_2x/Lattice.c
@@ -152,14 +152,6 @@ Lattice *Lattice_FromPyObject( PyObject * pyobj )
}
//***************************************************************************
-// Function: Lattice_CheckPyObject
-//***************************************************************************
-int Lattice_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Lattice_Type );
-}
-
-//***************************************************************************
// Function: M_Lattice_New
// Python equivalent: Blender.Lattice.New
//***************************************************************************
diff --git a/source/blender/python/api2_2x/Lattice.h b/source/blender/python/api2_2x/Lattice.h
index 36c69d67215..fb47c2dd2e4 100644
--- a/source/blender/python/api2_2x/Lattice.h
+++ b/source/blender/python/api2_2x/Lattice.h
@@ -39,6 +39,8 @@
/* The Group PyTypeObject defined in Lattice.c */
extern PyTypeObject Lattice_Type;
+#define BPy_Lattice_Check(v) ((v)->ob_type == &Lattice_Type)
+
/*****************************************************************************/
/* Python BPy_Lattice structure definition: */
/*****************************************************************************/
@@ -54,6 +56,5 @@ typedef struct {
PyObject *Lattice_Init( void );
PyObject *Lattice_CreatePyObject( Lattice * lt );
Lattice *Lattice_FromPyObject( PyObject * pyobj );
-int Lattice_CheckPyObject( PyObject * pyobj );
#endif /* EXPP_LATTICE_H */
diff --git a/source/blender/python/api2_2x/MTex.c b/source/blender/python/api2_2x/MTex.c
index 9e3e1883c7b..13c2ac8e0b7 100644
--- a/source/blender/python/api2_2x/MTex.c
+++ b/source/blender/python/api2_2x/MTex.c
@@ -271,13 +271,6 @@ MTex *MTex_FromPyObject( PyObject * pyobj )
return ( ( BPy_MTex * ) pyobj )->mtex;
}
-
-int MTex_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &MTex_Type );
-}
-
-
/*****************************************************************************/
/* Python BPy_MTex methods: */
/*****************************************************************************/
diff --git a/source/blender/python/api2_2x/MTex.h b/source/blender/python/api2_2x/MTex.h
index dfcd2cc00b8..2148212d82f 100644
--- a/source/blender/python/api2_2x/MTex.h
+++ b/source/blender/python/api2_2x/MTex.h
@@ -57,7 +57,6 @@ extern PyTypeObject MTex_Type;
PyObject *MTex_Init( void );
PyObject *MTex_CreatePyObject( struct MTex *obj );
-int MTex_CheckPyObject( PyObject * py_obj );
MTex *MTex_FromPyObject( PyObject * py_obj );
diff --git a/source/blender/python/api2_2x/Main.c b/source/blender/python/api2_2x/Main.c
index 4d4c9474f75..138c6f9fa7e 100644
--- a/source/blender/python/api2_2x/Main.c
+++ b/source/blender/python/api2_2x/Main.c
@@ -281,7 +281,7 @@ static int MainSeq_setActive(BPy_MainSeq *self, PyObject *value)
{
switch (self->type) {
case ID_SCE:
- if (!Scene_CheckPyObject(value)) {
+ if (!BPy_Scene_Check(value)) {
return EXPP_ReturnIntError(PyExc_TypeError,
"Must be a scene" );
} else {
@@ -303,7 +303,7 @@ static int MainSeq_setActive(BPy_MainSeq *self, PyObject *value)
return 0;
case ID_IM:
- if (!Image_CheckPyObject(value)) {
+ if (!BPy_Image_Check(value)) {
return EXPP_ReturnIntError(PyExc_TypeError,
"Must be a scene" );
} else {
diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c
index 092992c42f3..e3d1d533f5b 100644
--- a/source/blender/python/api2_2x/Material.c
+++ b/source/blender/python/api2_2x/Material.c
@@ -1217,16 +1217,6 @@ PyObject *Material_CreatePyObject( struct Material *mat )
}
/*****************************************************************************/
-/* Function: Material_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Material. Otherwise it will return false. */
-/*****************************************************************************/
-int Material_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Material_Type );
-}
-
-/*****************************************************************************/
/* Function: Material_FromPyObject */
/* Description: This function returns the Blender material from the given */
/* PyObject. */
@@ -2580,7 +2570,7 @@ Material **EXPP_newMaterialList_fromPyList( PyObject * list )
pymat = ( BPy_Material * ) PySequence_GetItem( list, i );
- if( Material_CheckPyObject( ( PyObject * ) pymat ) ) {
+ if( BPy_Material_Check( ( PyObject * ) pymat ) ) {
mat = pymat->material;
matlist[i] = mat;
} else if( ( PyObject * ) pymat == Py_None ) {
diff --git a/source/blender/python/api2_2x/Material.h b/source/blender/python/api2_2x/Material.h
index 6e3c3c767c4..e939b95a921 100644
--- a/source/blender/python/api2_2x/Material.h
+++ b/source/blender/python/api2_2x/Material.h
@@ -62,7 +62,6 @@ PyObject *M_Material_Init( void );
PyObject *Material_Init( void );
PyObject *Material_CreatePyObject( Material * mat );
Material *Material_FromPyObject( PyObject * pyobj );
-int Material_CheckPyObject( PyObject * pyobj );
/* colorband tp_getseters */
PyObject *EXPP_PyList_fromColorband( ColorBand *coba );
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index 25b0c3d366e..aec85597fd9 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -5654,7 +5654,7 @@ static PyObject *Mesh_getFromObject( BPy_Mesh * self, PyObject * args )
ob = ( Object * ) GetIdFromList( &( G.main->object ), name );
if( !ob )
return EXPP_ReturnPyObjError( PyExc_AttributeError, name );
- } else if ( Object_CheckPyObject(object_arg) ) {
+ } else if ( BPy_Object_Check(object_arg) ) {
ob = (( BPy_Object * ) object_arg)->object;
} else {
return EXPP_ReturnPyObjError( PyExc_TypeError,
@@ -8181,10 +8181,6 @@ PyObject *Mesh_CreatePyObject( Mesh * me, Object *obj )
return ( PyObject * ) nmesh;
}
-int Mesh_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Mesh_Type );
-}
Mesh *Mesh_FromPyObject( PyObject * pyobj, Object *obj )
{
diff --git a/source/blender/python/api2_2x/Mesh.h b/source/blender/python/api2_2x/Mesh.h
index 2599ae38fe3..0938f5fe8ef 100644
--- a/source/blender/python/api2_2x/Mesh.h
+++ b/source/blender/python/api2_2x/Mesh.h
@@ -122,7 +122,6 @@ typedef struct {
PyObject *Mesh_Init( void );
PyObject *Mesh_CreatePyObject( Mesh * me, Object *obj );
-int Mesh_CheckPyObject( PyObject * pyobj );
Mesh *Mesh_FromPyObject( PyObject * pyobj, Object *obj );
#endif /* EXPP_MESH_H */
diff --git a/source/blender/python/api2_2x/Metaball.c b/source/blender/python/api2_2x/Metaball.c
index 04a1be46485..ba6e0364e59 100644
--- a/source/blender/python/api2_2x/Metaball.c
+++ b/source/blender/python/api2_2x/Metaball.c
@@ -544,14 +544,6 @@ PyObject *Metaball_Init( void )
return submodule;
}
-
-
-int Metaball_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Metaball_Type );
-}
-
-
MetaBall *Metaball_FromPyObject( PyObject * pyobj )
{
return ( ( BPy_Metaball * ) pyobj )->metaball;
diff --git a/source/blender/python/api2_2x/Metaball.h b/source/blender/python/api2_2x/Metaball.h
index af04b2099b8..a54424302df 100644
--- a/source/blender/python/api2_2x/Metaball.h
+++ b/source/blender/python/api2_2x/Metaball.h
@@ -77,6 +77,5 @@ typedef struct {
PyObject *Metaball_Init( void );
PyObject *Metaball_CreatePyObject( MetaBall * mball );
MetaBall *Metaball_FromPyObject( PyObject * py_obj );
-int Metaball_CheckPyObject( PyObject * py_obj );
#endif /* EXPP_METABALL_H */
diff --git a/source/blender/python/api2_2x/Modifier.c b/source/blender/python/api2_2x/Modifier.c
index a18b12ece8d..6745ad4aa8d 100644
--- a/source/blender/python/api2_2x/Modifier.c
+++ b/source/blender/python/api2_2x/Modifier.c
@@ -1021,16 +1021,6 @@ PyObject *Modifier_CreatePyObject( Object *ob, ModifierData * md )
}
/*****************************************************************************/
-/* Function: Modifier_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Modifier. Otherwise it will return false. */
-/*****************************************************************************/
-int Modifier_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Modifier_Type );
-}
-
-/*****************************************************************************/
/* Function: Modifier_FromPyObject */
/* Description: This function returns the Blender modifier from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/Modifier.h b/source/blender/python/api2_2x/Modifier.h
index 5e57287dac8..e61371cd192 100644
--- a/source/blender/python/api2_2x/Modifier.h
+++ b/source/blender/python/api2_2x/Modifier.h
@@ -68,6 +68,5 @@ PyObject *Modifier_Init( void );
PyObject *ModSeq_CreatePyObject( Object *obj, ModifierData *iter );
PyObject *Modifier_CreatePyObject( Object *obj, ModifierData *md );
ModifierData *Modifier_FromPyObject( PyObject * py_obj );
-int Modifier_CheckPyObject( PyObject * py_obj );
#endif /* EXPP_MODIFIER_H */
diff --git a/source/blender/python/api2_2x/NLA.c b/source/blender/python/api2_2x/NLA.c
index 2c7f466cb56..22df94b4bfb 100644
--- a/source/blender/python/api2_2x/NLA.c
+++ b/source/blender/python/api2_2x/NLA.c
@@ -406,12 +406,6 @@ PyObject *Action_CreatePyObject( struct bAction * act )
}
/*----------------------------------------------------------------------*/
-int Action_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &Action_Type );
-}
-
-/*----------------------------------------------------------------------*/
struct bAction *Action_FromPyObject( PyObject * py_obj )
{
BPy_Action *blen_obj;
diff --git a/source/blender/python/api2_2x/NLA.h b/source/blender/python/api2_2x/NLA.h
index 287499ab5e1..45873db40a4 100644
--- a/source/blender/python/api2_2x/NLA.h
+++ b/source/blender/python/api2_2x/NLA.h
@@ -69,7 +69,6 @@ typedef struct {
#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 );
diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c
index 9cfeffc8ab1..0f9a3dd79ca 100644
--- a/source/blender/python/api2_2x/NMesh.c
+++ b/source/blender/python/api2_2x/NMesh.c
@@ -2807,7 +2807,7 @@ PyObject *NMesh_assignMaterials_toObject( BPy_NMesh * nmesh, Object * ob )
pymat = ( BPy_Material * ) PySequence_GetItem( nmesh->
materials, i );
- if( Material_CheckPyObject( ( PyObject * ) pymat ) ) {
+ if( BPy_Material_Check( ( PyObject * ) pymat ) ) {
ma = pymat->material;
assign_material( ob, ma, i + 1 ); /*@ XXX don't use this function anymore */
} else {
@@ -3357,11 +3357,6 @@ PyObject *NMesh_CreatePyObject( Mesh * me, Object * ob )
return ( PyObject * ) nmesh;
}
-int NMesh_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &NMesh_Type );
-}
-
Mesh *NMesh_FromPyObject( PyObject * pyobj, Object * ob )
{
if( pyobj->ob_type == &NMesh_Type ) {
diff --git a/source/blender/python/api2_2x/NMesh.h b/source/blender/python/api2_2x/NMesh.h
index d623d737bfa..13ae12af522 100644
--- a/source/blender/python/api2_2x/NMesh.h
+++ b/source/blender/python/api2_2x/NMesh.h
@@ -145,8 +145,6 @@ typedef struct {
PyObject *NMesh_Init( void );
PyObject *NMesh_CreatePyObject( Mesh * me, Object * ob );
Mesh *NMesh_FromPyObject( PyObject * pyobj, Object * ob );
-int NMesh_CheckPyObject( PyObject * pyobj );
-
void mesh_update( Mesh * mesh , Object * ob );
PyObject *new_NMesh( Mesh * oldmesh );
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index 50f92474018..ab76646eb1f 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -1587,25 +1587,25 @@ static PyObject *Object_link( BPy_Object * self, PyObject * args )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected an object as argument" );
- if( ArmatureObject_Check( py_data ) )
+ if( BPy_Armature_Check( py_data ) )
data = ( void * ) PyArmature_AsArmature((BPy_Armature*)py_data);
- else if( Camera_CheckPyObject( py_data ) )
+ else if( BPy_Camera_Check( py_data ) )
data = ( void * ) Camera_FromPyObject( py_data );
- else if( Lamp_CheckPyObject( py_data ) )
+ else if( BPy_Lamp_Check( py_data ) )
data = ( void * ) Lamp_FromPyObject( py_data );
- else if( Curve_CheckPyObject( py_data ) )
+ else if( BPy_Curve_Check( py_data ) )
data = ( void * ) Curve_FromPyObject( py_data );
- else if( NMesh_CheckPyObject( py_data ) ) {
+ else if( BPy_NMesh_Check( py_data ) ) {
data = ( void * ) NMesh_FromPyObject( py_data, self->object );
if( !data ) /* NULL means there is already an error */
return NULL;
- } else if( Mesh_CheckPyObject( py_data ) )
+ } else if( BPy_Mesh_Check( py_data ) )
data = ( void * ) Mesh_FromPyObject( py_data, self->object );
- else if( Lattice_CheckPyObject( py_data ) )
+ else if( BPy_Lattice_Check( py_data ) )
data = ( void * ) Lattice_FromPyObject( py_data );
- else if( Metaball_CheckPyObject( py_data ) )
+ else if( BPy_Metaball_Check( py_data ) )
data = ( void * ) Metaball_FromPyObject( py_data );
- else if( Text3d_CheckPyObject( py_data ) )
+ else if( BPy_Text3d_Check( py_data ) )
data = ( void * ) Text3d_FromPyObject( py_data );
/* have we set data to something good? */
@@ -1988,7 +1988,7 @@ static PyObject *Object_join( BPy_Object * self, PyObject * args )
/* Check if the PyObject passed in list is a Blender object. */
for( i = 0; i < list_length; i++ ) {
py_child = PySequence_GetItem( list, i );
- if( !Object_CheckPyObject( py_child ) ) {
+ if( !BPy_Object_Check( py_child ) ) {
/* Cleanup */
free_libblock( &G.main->scene, temp_scene );
Py_DECREF( py_child );
@@ -2084,7 +2084,7 @@ static PyObject *internal_makeParent(Object *parent, PyObject *py_child,
{
Object *child = NULL;
- if( Object_CheckPyObject( py_child ) )
+ if( BPy_Object_Check( py_child ) )
child = ( Object * ) Object_FromPyObject( py_child );
if( child == NULL )
@@ -2843,7 +2843,7 @@ static PyObject *Object_removeProperty( BPy_Object * self, PyObject * args )
/* we accept either a property stringname or actual object */
if( PyTuple_Size( args ) == 1 ) {
PyObject *prop = PyTuple_GET_ITEM( args, 0 );
- if( Property_CheckPyObject( prop ) )
+ if( BPy_Property_Check( prop ) )
py_prop = (BPy_Property *)prop;
else
prop_name = PyString_AsString( prop );
@@ -3101,16 +3101,6 @@ PyObject *Object_CreatePyObject( struct Object * obj )
}
/*****************************************************************************/
-/* Function: Object_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Object. Otherwise it will return false. */
-/*****************************************************************************/
-int Object_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &Object_Type );
-}
-
-/*****************************************************************************/
/* Function: Object_FromPyObject */
/* Description: This function returns the Blender object from the given */
/* PyObject. */
diff --git a/source/blender/python/api2_2x/Object.h b/source/blender/python/api2_2x/Object.h
index 71cedfd654f..557513560fd 100644
--- a/source/blender/python/api2_2x/Object.h
+++ b/source/blender/python/api2_2x/Object.h
@@ -54,7 +54,6 @@ typedef struct {
PyObject *Object_Init( void );
PyObject *Object_CreatePyObject( struct Object *obj );
Object *Object_FromPyObject( PyObject * py_obj );
-int Object_CheckPyObject( PyObject * py_obj );
void Object_updateDag( void *data );
diff --git a/source/blender/python/api2_2x/Pose.h b/source/blender/python/api2_2x/Pose.h
index d4df65042e8..17a9f871ee3 100644
--- a/source/blender/python/api2_2x/Pose.h
+++ b/source/blender/python/api2_2x/Pose.h
@@ -36,9 +36,9 @@
#include "DNA_object_types.h"
//-------------------TYPE CHECKS---------------------------------
-#define PoseObject_Check(v) ((v)->ob_type == &Pose_Type)
-#define PoseBoneObject_Check(v) ((v)->ob_type == &PoseBone_Type)
-#define PoseBonesDictObject_Check(v) ((v)->ob_type == &PoseBonesDict_Type)
+#define BPy_Pose_Check(v) ((v)->ob_type == &Pose_Type)
+#define BPy_PoseBone_Check(v) ((v)->ob_type == &PoseBone_Type)
+#define BPy_PoseBonesDict_Check(v) ((v)->ob_type == &PoseBonesDict_Type)
//-------------------TYPEOBJECT----------------------------------
extern PyTypeObject Pose_Type;
extern PyTypeObject PoseBone_Type;
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c
index 89efe42ef28..96ca435cdc9 100644
--- a/source/blender/python/api2_2x/Scene.c
+++ b/source/blender/python/api2_2x/Scene.c
@@ -592,12 +592,6 @@ PyObject *Scene_CreatePyObject( Scene * scene )
return ( PyObject * ) pyscene;
}
-/*-----------------------CheckPyObject----------------------------------*/
-int Scene_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Scene_Type );
-}
-
/*-----------------------FromPyObject-----------------------------------*/
Scene *Scene_FromPyObject( PyObject * pyobj )
{
@@ -1459,33 +1453,33 @@ static PyObject *SceneObSeq_new( BPy_SceneObSeq * self, PyObject *args )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"scene.objects.new(obdata) - expected obdata to be\n\ta python obdata type or the string 'Empty'" );
- if( Armature_CheckPyObject( py_data ) ) {
+ if( BPy_Armature_Check( py_data ) ) {
data = ( void * ) Armature_FromPyObject( py_data );
type = OB_ARMATURE;
- } else if( Camera_CheckPyObject( py_data ) ) {
+ } else if( BPy_Camera_Check( py_data ) ) {
data = ( void * ) Camera_FromPyObject( py_data );
type = OB_CAMERA;
- } else if( Lamp_CheckPyObject( py_data ) ) {
+ } else if( BPy_Lamp_Check( py_data ) ) {
data = ( void * ) Lamp_FromPyObject( py_data );
type = OB_LAMP;
- } else if( Curve_CheckPyObject( py_data ) ) {
+ } else if( BPy_Curve_Check( py_data ) ) {
data = ( void * ) Curve_FromPyObject( py_data );
type = OB_CURVE;
- } else if( NMesh_CheckPyObject( py_data ) ) {
+ } else if( BPy_NMesh_Check( py_data ) ) {
data = ( void * ) NMesh_FromPyObject( py_data, NULL );
type = OB_MESH;
if( !data ) /* NULL means there is already an error */
return NULL;
- } else if( Mesh_CheckPyObject( py_data ) ) {
+ } else if( BPy_Mesh_Check( py_data ) ) {
data = ( void * ) Mesh_FromPyObject( py_data, NULL );
type = OB_MESH;
- } else if( Lattice_CheckPyObject( py_data ) ) {
+ } else if( BPy_Lattice_Check( py_data ) ) {
data = ( void * ) Lattice_FromPyObject( py_data );
type = OB_LATTICE;
- } else if( Metaball_CheckPyObject( py_data ) ) {
+ } else if( BPy_Metaball_Check( py_data ) ) {
data = ( void * ) Metaball_FromPyObject( py_data );
type = OB_MBALL;
- } else if( Text3d_CheckPyObject( py_data ) ) {
+ } else if( BPy_Text3d_Check( py_data ) ) {
data = ( void * ) Text3d_FromPyObject( py_data );
type = OB_FONT;
} else if( ( desc = PyString_AsString( (PyObject *)py_data ) ) != NULL ) {
diff --git a/source/blender/python/api2_2x/Scene.h b/source/blender/python/api2_2x/Scene.h
index c390bb934dc..e6e509159d5 100644
--- a/source/blender/python/api2_2x/Scene.h
+++ b/source/blender/python/api2_2x/Scene.h
@@ -66,6 +66,5 @@ typedef struct {
PyObject *Scene_Init( void );
PyObject *Scene_CreatePyObject( Scene * scene );
/*Scene *Scene_FromPyObject( PyObject * pyobj );*/ /* not used yet */
-int Scene_CheckPyObject( PyObject * pyobj );
#endif /* EXPP_SCENE_H */
diff --git a/source/blender/python/api2_2x/Sound.c b/source/blender/python/api2_2x/Sound.c
index 04cca0bd3c2..cb6d6394a28 100644
--- a/source/blender/python/api2_2x/Sound.c
+++ b/source/blender/python/api2_2x/Sound.c
@@ -350,16 +350,6 @@ PyObject *Sound_CreatePyObject( bSound * snd )
}
/*****************************************************************************/
-/* Function: Sound_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Sound. Otherwise it will return false. */
-/*****************************************************************************/
-int Sound_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Sound_Type );
-}
-
-/*****************************************************************************/
/* Function: Sound_FromPyObject */
/* Description: Returns the Blender Sound associated with this object */
/*****************************************************************************/
diff --git a/source/blender/python/api2_2x/Sound.h b/source/blender/python/api2_2x/Sound.h
index 25a91db7fd6..7a84bbd901d 100644
--- a/source/blender/python/api2_2x/Sound.h
+++ b/source/blender/python/api2_2x/Sound.h
@@ -53,6 +53,5 @@ typedef struct {
PyObject *Sound_Init( void );
PyObject *Sound_CreatePyObject( bSound * sound );
bSound *Sound_FromPyObject( PyObject * pyobj );
-int Sound_CheckPyObject( PyObject * pyobj );
#endif /* EXPP_SOUND_H */
diff --git a/source/blender/python/api2_2x/SurfNurb.c b/source/blender/python/api2_2x/SurfNurb.c
index cea8df325b2..981c1b1dbac 100644
--- a/source/blender/python/api2_2x/SurfNurb.c
+++ b/source/blender/python/api2_2x/SurfNurb.c
@@ -105,7 +105,7 @@ static PyObject *SurfNurb_appendPointToNurb( Nurb * nurb, PyObject * args )
/* if curve is empty, adjust type depending on input type */
if (nurb->bezt==NULL && nurb->bp==NULL) {
- if (BezTriple_CheckPyObject( pyOb ))
+ if (BPy_BezTriple_Check( pyOb ))
nurb->type |= CU_BEZIER;
else if (PySequence_Check( pyOb ))
nurb->type |= CU_NURBS;
@@ -119,7 +119,7 @@ static PyObject *SurfNurb_appendPointToNurb( Nurb * nurb, PyObject * args )
if ((nurb->type & 7)==CU_BEZIER) {
BezTriple *tmp;
- if( !BezTriple_CheckPyObject( pyOb ) )
+ if( !BPy_BezTriple_Check( pyOb ) )
return( EXPP_ReturnPyObjError( PyExc_TypeError,
"Expected a BezTriple\n" ) );
@@ -517,7 +517,7 @@ static int SurfNurb_length( PyInstanceObject * inst )
{
Nurb *nurb;
- if( SurfNurb_CheckPyObject( ( PyObject * ) inst ) ) {
+ if( BPy_SurfNurb_Check( ( PyObject * ) inst ) ) {
nurb = ( ( BPy_SurfNurb * ) inst )->nurb;
return (int)(nurb->pntsu * nurb->pntsu);
}
@@ -577,7 +577,7 @@ static int SurfNurb_setPoint( BPy_SurfNurb * self, int index, PyObject * pyOb )
#if 0
if ((nurb->type & 7)==CU_BEZIER) { /* BEZIER */
/* check parameter type */
- if( !BezTriple_CheckPyObject( pyOb ) )
+ if( !BPy_BezTriple_Check( pyOb ) )
return EXPP_ReturnIntError( PyExc_TypeError,
"expected a BezTriple\n" );
@@ -666,14 +666,6 @@ PyObject *SurfNurb_pointAtIndex( Nurb * nurb, int index )
"non-NURB surface found" );
}
-
-int SurfNurb_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &SurfNurb_Type );
-}
-
-
-
/*
* methods for SurfNurb as sequence
*/
diff --git a/source/blender/python/api2_2x/SurfNurb.h b/source/blender/python/api2_2x/SurfNurb.h
index dcb4f9d4280..0559d84cbaf 100644
--- a/source/blender/python/api2_2x/SurfNurb.h
+++ b/source/blender/python/api2_2x/SurfNurb.h
@@ -60,7 +60,6 @@ typedef struct {
PyObject *SurfNurb_Init( void );
PyObject *SurfNurb_CreatePyObject( Nurb * bzt );
-int SurfNurb_CheckPyObject( PyObject * pyobj );
Nurb *SurfNurb_FromPyObject( PyObject * pyobj );
PyObject *SurfNurb_getPoint( BPy_SurfNurb * self, int index );
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c
index 455668882d1..028005e128b 100644
--- a/source/blender/python/api2_2x/Text3d.c
+++ b/source/blender/python/api2_2x/Text3d.c
@@ -630,12 +630,6 @@ static int Text3d_compare( BPy_Text3d * a, BPy_Text3d * b )
return ( a->curve == b->curve) ? 0 : -1;
}
-
-int Text3d_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &Text3d_Type );
-}
-
struct Text3d *Text3d_FromPyObject( PyObject * py_obj )
{
BPy_Text3d *blen_obj;
diff --git a/source/blender/python/api2_2x/Text3d.h b/source/blender/python/api2_2x/Text3d.h
index f767f10d9a2..6486278f20d 100644
--- a/source/blender/python/api2_2x/Text3d.h
+++ b/source/blender/python/api2_2x/Text3d.h
@@ -36,11 +36,12 @@
#include <Python.h>
#include "DNA_curve_types.h"
+extern PyTypeObject Text3d_Type;
+
#define BPy_Text3d_Check(v) ((v)->ob_type==&Text3d_Type)
typedef Curve Text3d;
/*prototypes*/
-int Text3d_CheckPyObject( PyObject * py_obj );
PyObject *Text3d_Init( void );
struct Text3d *Text3d_FromPyObject( PyObject * py_obj );
PyObject *Text3d_CreatePyObject( Text3d* text3d );
diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c
index 909efcc680b..9e657dec109 100644
--- a/source/blender/python/api2_2x/Texture.c
+++ b/source/blender/python/api2_2x/Texture.c
@@ -1339,11 +1339,6 @@ Tex *Texture_FromPyObject( PyObject * pyobj )
return ( ( BPy_Texture * ) pyobj )->texture;
}
-int Texture_CheckPyObject( PyObject * pyobj )
-{
- return ( pyobj->ob_type == &Texture_Type );
-}
-
/*****************************************************************************/
/* Python BPy_Texture methods: */
/*****************************************************************************/
@@ -1966,7 +1961,7 @@ static int Texture_setIpo( BPy_Texture * self, PyObject * value )
/* if parameter is not None, check for valid Ipo */
if ( value != Py_None ) {
- if ( !Ipo_CheckPyObject( value ) )
+ if ( !BPy_Ipo_Check( value ) )
return EXPP_ReturnIntError( PyExc_RuntimeError,
"expected an Ipo object" );
diff --git a/source/blender/python/api2_2x/Texture.h b/source/blender/python/api2_2x/Texture.h
index b162dc4b2e9..a5451687779 100644
--- a/source/blender/python/api2_2x/Texture.h
+++ b/source/blender/python/api2_2x/Texture.h
@@ -58,7 +58,6 @@ extern PyTypeObject Texture_Type;
PyObject *Texture_Init( void );
PyObject *Texture_CreatePyObject( struct Tex *tex );
-int Texture_CheckPyObject( PyObject * pyobj );
Tex *Texture_FromPyObject( PyObject * pyobj );
diff --git a/source/blender/python/api2_2x/World.c b/source/blender/python/api2_2x/World.c
index 3c212c5f192..0c45c6d40a6 100644
--- a/source/blender/python/api2_2x/World.c
+++ b/source/blender/python/api2_2x/World.c
@@ -985,12 +985,6 @@ PyObject *World_CreatePyObject( struct World * world )
return ( ( PyObject * ) blen_object );
}
-int World_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &World_Type );
-}
-
-
World *World_FromPyObject( PyObject * py_obj )
{
BPy_World *blen_obj;
diff --git a/source/blender/python/api2_2x/World.h b/source/blender/python/api2_2x/World.h
index 929d13a4ee7..ff0ec8709d7 100644
--- a/source/blender/python/api2_2x/World.h
+++ b/source/blender/python/api2_2x/World.h
@@ -54,6 +54,5 @@ extern PyTypeObject World_Type;
PyObject *World_Init( void );
PyObject *World_CreatePyObject( World * world );
World *World_FromPyObject( PyObject * pyobj );
-int World_CheckPyObject( PyObject * pyobj );
#endif /* EXPP_WORLD_H */
diff --git a/source/blender/python/api2_2x/logic.c b/source/blender/python/api2_2x/logic.c
index 5af991e9f20..a6bac521152 100644
--- a/source/blender/python/api2_2x/logic.c
+++ b/source/blender/python/api2_2x/logic.c
@@ -347,12 +347,6 @@ PyObject *Property_CreatePyObject( struct bProperty * Property )
return ( ( PyObject * ) py_property );
}
-//--------------- Property_CheckPyObject----------------------------
-int Property_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &property_Type );
-}
-
//--------------- Property_FromPyObject-----------------------------
struct bProperty *Property_FromPyObject( PyObject * py_obj )
{
diff --git a/source/blender/python/api2_2x/logic.h b/source/blender/python/api2_2x/logic.h
index 74478b44acf..013c26af4f2 100644
--- a/source/blender/python/api2_2x/logic.h
+++ b/source/blender/python/api2_2x/logic.h
@@ -38,6 +38,8 @@
extern PyTypeObject property_Type;
+#define BPy_Property_Check(v) ((v)->ob_type == &property_Type)
+
//--------------------------Python BPy_Property structure definition.----
typedef struct {
PyObject_HEAD
@@ -51,7 +53,6 @@ typedef struct {
//------------------------------visible prototypes-----------------------
PyObject *Property_CreatePyObject( struct bProperty *prop );
-int Property_CheckPyObject( PyObject * py_obj );
bProperty *Property_FromPyObject( PyObject * py_obj );
PyObject *newPropertyObject( char *name, PyObject * data, int type );
int updatePyProperty( BPy_Property * self );
diff --git a/source/blender/python/api2_2x/sceneRadio.c b/source/blender/python/api2_2x/sceneRadio.c
index 5a1e7c55a8a..080f99cd4f9 100644
--- a/source/blender/python/api2_2x/sceneRadio.c
+++ b/source/blender/python/api2_2x/sceneRadio.c
@@ -704,11 +704,6 @@ PyObject *Radio_CreatePyObject( struct Scene * scene )
return ( ( PyObject * ) py_radio );
}
-int Radio_CheckPyObject( PyObject * pyob )
-{
- return ( pyob->ob_type == &Radio_Type );
-}
-
static PyObject *Radio_collectMeshes( BPy_Radio * self )
{
if( !EXPP_check_scene( self->scene ) )
diff --git a/source/blender/python/api2_2x/sceneRadio.h b/source/blender/python/api2_2x/sceneRadio.h
index 3909194ca47..9d7d43aed8b 100644
--- a/source/blender/python/api2_2x/sceneRadio.h
+++ b/source/blender/python/api2_2x/sceneRadio.h
@@ -47,6 +47,5 @@ typedef struct {
PyObject *Radio_Init( void );
PyObject *Radio_CreatePyObject( struct Scene *scene );
-int Radio_CheckPyObject( PyObject * py_obj );
#endif /* EXPP_SCENERADIO_H */
diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c
index e37acb00680..2034a00788f 100644
--- a/source/blender/python/api2_2x/sceneRender.c
+++ b/source/blender/python/api2_2x/sceneRender.c
@@ -2703,11 +2703,6 @@ PyObject *RenderData_CreatePyObject( struct Scene * scene )
return ( ( PyObject * ) py_renderdata );
}
-int RenderData_CheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &RenderData_Type );
-}
-
/* #####DEPRECATED###### */
static PyObject *RenderData_SetRenderPath( BPy_RenderData *self,
diff --git a/source/blender/python/api2_2x/sceneRender.h b/source/blender/python/api2_2x/sceneRender.h
index 32527ef6e89..73bf71f5c06 100644
--- a/source/blender/python/api2_2x/sceneRender.h
+++ b/source/blender/python/api2_2x/sceneRender.h
@@ -36,6 +36,8 @@
#include <Python.h>
#include "DNA_scene_types.h"
+#define BPy_RenderData_Check(v) ((v)->ob_type == &RenderData_Type)
+
//------------------------------------Struct definitions-------
typedef struct {
PyObject_HEAD
@@ -46,6 +48,5 @@ typedef struct {
PyObject *Render_Init( void );
PyObject *RenderData_CreatePyObject( struct Scene *scene );
-int RenderData_CheckPyObject( PyObject * py_obj );
#endif /* EXPP_SCENERENDER_H */
diff --git a/source/blender/python/api2_2x/sceneSequence.c b/source/blender/python/api2_2x/sceneSequence.c
index 1ef88c4353a..f6cad95b8ab 100644
--- a/source/blender/python/api2_2x/sceneSequence.c
+++ b/source/blender/python/api2_2x/sceneSequence.c
@@ -462,7 +462,7 @@ static int Sequence_setIpo( BPy_Sequence * self, PyObject * value )
/* if parameter is not None, check for valid Ipo */
if ( value != Py_None ) {
- if ( !Ipo_CheckPyObject( value ) )
+ if ( !BPy_Ipo_Check( value ) )
return EXPP_ReturnIntError( PyExc_TypeError,
"expected an Ipo object" );
@@ -1033,21 +1033,6 @@ PyObject *SceneSeq_CreatePyObject( struct Scene * scn, struct Sequence * iter)
return ( ( PyObject * ) pysceseq );
}
-
-/*****************************************************************************/
-/* Function: Sequence_CheckPyObject */
-/* Description: This function returns true when the given PyObject is of the */
-/* type Sequence. Otherwise it will return false. */
-/*****************************************************************************/
-int Sequence_CheckPyObject( PyObject * py_seq)
-{
- return ( py_seq->ob_type == &Sequence_Type );
-}
-int SceneSeq_CheckPyObject( PyObject * py_seq)
-{
- return ( py_seq->ob_type == &SceneSeq_Type );
-}
-
/*****************************************************************************/
/* Function: Sequence_FromPyObject */
/* Description: This function returns the Blender sequence from the given */
diff --git a/source/blender/python/api2_2x/sceneSequence.h b/source/blender/python/api2_2x/sceneSequence.h
index adb43af4a52..49890043966 100644
--- a/source/blender/python/api2_2x/sceneSequence.h
+++ b/source/blender/python/api2_2x/sceneSequence.h
@@ -79,7 +79,5 @@ PyObject *Sequence_Init( void );
PyObject *Sequence_CreatePyObject( struct Sequence * seq, struct Sequence * iter, struct Scene * scn);
PyObject *SceneSeq_CreatePyObject( struct Scene * scn, struct Sequence * iter);
struct Sequence *Sequence_FromPyObject( PyObject * py_obj );
-int Sequence_CheckPyObject( PyObject * py_obj );
-int SceneSeq_CheckPyObject( PyObject * py_obj );
#endif /* EXPP_SEQUENCE_H */
diff --git a/source/blender/python/api2_2x/sceneTimeLine.h b/source/blender/python/api2_2x/sceneTimeLine.h
index a620a491ac9..ffeff1ef3b7 100644
--- a/source/blender/python/api2_2x/sceneTimeLine.h
+++ b/source/blender/python/api2_2x/sceneTimeLine.h
@@ -53,7 +53,6 @@ typedef struct {
PyObject *TimeLine_Init (void);
PyObject *TimeLine_CreatePyObject (BPy_TimeLine *tl);
BPy_TimeLine *TimeLine_FromPyObject (PyObject * pyobj);
-int TimeLine_CheckPyObject (PyObject * pyobj);
#endif /* EXPP_TMARKER_H */