remove unneeded checks from the python API

This commit is contained in:
2007-06-29 08:59:26 +00:00
parent 684869fd74
commit e192e7e024
22 changed files with 273 additions and 1534 deletions

View File

@@ -1554,13 +1554,7 @@ Mesh *Mesh_fromNMesh( BPy_NMesh * nmesh )
static PyObject *NMesh_getMaxSmoothAngle( BPy_NMesh * self )
{
PyObject *attr = PyInt_FromLong( self->smoothresh );
if( attr )
return attr;
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"couldn't get NMesh.maxSmoothAngle attribute" );
return PyInt_FromLong( self->smoothresh );
}
static PyObject *NMesh_setMaxSmoothAngle( PyObject * self, PyObject * args )
@@ -1581,14 +1575,7 @@ static PyObject *NMesh_setMaxSmoothAngle( PyObject * self, PyObject * args )
static PyObject *NMesh_getSubDivLevels( BPy_NMesh * self )
{
PyObject *attr =
Py_BuildValue( "[h,h]", self->subdiv[0], self->subdiv[1] );
if( attr )
return attr;
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"couldn't get NMesh.subDivLevels attribute" );
return Py_BuildValue( "[h,h]", self->subdiv[0], self->subdiv[1] );
}
static PyObject *NMesh_setSubDivLevels( PyObject * self, PyObject * args )
@@ -1613,13 +1600,7 @@ static PyObject *NMesh_setSubDivLevels( PyObject * self, PyObject * args )
static PyObject *NMesh_getMode( BPy_NMesh * self )
{
PyObject *attr = PyInt_FromLong( self->mode );
if( attr )
return attr;
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"couldn't get NMesh.mode attribute" );
return PyInt_FromLong( self->mode );
}
static PyObject *NMesh_setMode( PyObject * self, PyObject * args )