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:
authorCampbell Barton <ideasman42@gmail.com>2007-03-15 04:09:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-15 04:09:14 +0300
commitee5dc4d0bf99fe457ece7b37df72dc1cc12e3cd1 (patch)
treec42b47cc23156ca0e8a03610faf175f9535a5b5d /source/blender/python/api2_2x/CurNurb.c
parenta567e43628e780b5cc88f0f1aa73eb3111eab0f5 (diff)
removed duplicate functionality, macro's and functions existed to check a PyObjects type, now only use macro's
Diffstat (limited to 'source/blender/python/api2_2x/CurNurb.c')
-rw-r--r--source/blender/python/api2_2x/CurNurb.c13
1 files changed, 4 insertions, 9 deletions
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)