diff options
author | Ken Hughes <khughes@pacific.edu> | 2006-04-29 00:32:41 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2006-04-29 00:32:41 +0400 |
commit | fce1ff563414a0747111d36c25e5d866adbdb48d (patch) | |
tree | 60b9268ec0d21a2e92d236d0015235efb10d0118 /source/blender/python/api2_2x/Modifier.c | |
parent | be282bdf3f70a0feba65523c418f8b1134bff35a (diff) |
===Python API===
Bugfix: call to EXPP_ReturnPyObjError() was discarding value
Diffstat (limited to 'source/blender/python/api2_2x/Modifier.c')
-rw-r--r-- | source/blender/python/api2_2x/Modifier.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Modifier.c b/source/blender/python/api2_2x/Modifier.c index 4e23dbe839e..e6711a2b6d5 100644 --- a/source/blender/python/api2_2x/Modifier.c +++ b/source/blender/python/api2_2x/Modifier.c @@ -25,7 +25,7 @@ * * This is a new part of Blender. * - * Contributor(s): Ken Hughes + * Contributor(s): Ken Hughes, Campbell Barton * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ @@ -934,8 +934,8 @@ static PyObject *ModSeq_append( BPy_ModSeq *self, PyObject *args ) if( !PyArg_ParseTuple( args, "i", &type ) ) EXPP_ReturnPyObjError( PyExc_TypeError, "expected int argument" ); - if (type==0 || type >= NUM_MODIFIER_TYPES) /* type 0 is eModifierType_None, should we be able to add one of these? */ - EXPP_ReturnPyObjError( PyExc_TypeError, "int argument out of range, expected an int from Blender.Modifier.Type" ); + if (type<=0 || type >= NUM_MODIFIER_TYPES) /* type 0 is eModifierType_None, should we be able to add one of these? */ + return EXPP_ReturnPyObjError( PyExc_TypeError, "int argument out of range, expected an int from Blender.Modifier.Type" ); BLI_addtail( &self->obj->modifiers, modifier_new( type ) ); return Modifier_CreatePyObject( self->obj, self->obj->modifiers.last ); |