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-06-29 12:59:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-06-29 12:59:26 +0400
commite192e7e02452c70511f688582d8d95d0a6267ee5 (patch)
tree75698ba122c3820668888ab38958e5c7e5cbb591 /source/blender/python/api2_2x/Camera.c
parent684869fd74a3a908a5df5802f440bfa823f6c802 (diff)
remove unneeded checks from the python API
Diffstat (limited to 'source/blender/python/api2_2x/Camera.c')
-rw-r--r--source/blender/python/api2_2x/Camera.c56
1 files changed, 7 insertions, 49 deletions
diff --git a/source/blender/python/api2_2x/Camera.c b/source/blender/python/api2_2x/Camera.c
index a7ebd786158..feb2c79ddae 100644
--- a/source/blender/python/api2_2x/Camera.c
+++ b/source/blender/python/api2_2x/Camera.c
@@ -363,79 +363,37 @@ Camera *Camera_FromPyObject( PyObject * pyobj )
static PyObject *Camera_oldgetType( BPy_Camera * self )
{
- PyObject *attr = PyInt_FromLong( self->camera->type );
-
- if( attr )
- return attr;
-
- return EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't get Camera.type attribute" );
+ return PyInt_FromLong( self->camera->type );
}
static PyObject *Camera_oldgetMode( BPy_Camera * self )
{
- PyObject *attr = PyInt_FromLong( self->camera->flag );
-
- if( attr )
- return attr;
-
- return EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't get Camera.Mode attribute" );
+ return PyInt_FromLong( self->camera->flag );
}
static PyObject *Camera_oldgetLens( BPy_Camera * self )
{
- PyObject *attr = PyFloat_FromDouble( self->camera->lens );
-
- if( attr )
- return attr;
-
- return EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't get Camera.lens attribute" );
+ return PyFloat_FromDouble( self->camera->lens );
}
static PyObject *Camera_oldgetScale( BPy_Camera * self )
{
- PyObject *attr = PyFloat_FromDouble( self->camera->ortho_scale );
-
- if( attr )
- return attr;
-
- return EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't get Camera.scale attribute" );
+ return PyFloat_FromDouble( self->camera->ortho_scale );
}
static PyObject *Camera_oldgetClipStart( BPy_Camera * self )
{
- PyObject *attr = PyFloat_FromDouble( self->camera->clipsta );
-
- if( attr )
- return attr;
-
- return EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't get Camera.clipStart attribute" );
+ return PyFloat_FromDouble( self->camera->clipsta );
}
static PyObject *Camera_oldgetClipEnd( BPy_Camera * self )
{
- PyObject *attr = PyFloat_FromDouble( self->camera->clipend );
-
- if( attr )
- return attr;
-
- return EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't get Camera.clipEnd attribute" );
+ return PyFloat_FromDouble( self->camera->clipend );
}
static PyObject *Camera_oldgetDrawSize( BPy_Camera * self )
{
- PyObject *attr = PyFloat_FromDouble( self->camera->drawsize );
-
- if( attr )
- return attr;
-
- return EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't get Camera.drawSize attribute" );
+ return PyFloat_FromDouble( self->camera->drawsize );
}