removed duplicate functionality, macro's and functions existed to check a PyObjects type, now only use macro's

This commit is contained in:
Campbell Barton
2007-03-15 01:09:14 +00:00
parent a567e43628
commit ee5dc4d0bf
66 changed files with 54 additions and 319 deletions

View File

@@ -1216,16 +1216,6 @@ PyObject *Material_CreatePyObject( struct Material *mat )
return ( PyObject * ) pymat;
}
/*****************************************************************************/
/* 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 */
@@ -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 ) {