diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2005-09-24 19:28:59 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2005-09-24 19:28:59 +0400 |
commit | 94aa84362604cbf421fa12bafa3472cc46aff049 (patch) | |
tree | de949fd1a862d203ae8feae2f640ff1157f0f784 | |
parent | 0ce3341aaaeea41f61cbbfde892d1d216156f3bd (diff) |
Patch #3099 - bugfix for #3097.
a little tweak for arg parsing.
Contributed by Ken Hughes. Thanks!
-rw-r--r-- | source/blender/python/api2_2x/Texture.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c index 1a73e04e971..7682facd817 100644 --- a/source/blender/python/api2_2x/Texture.c +++ b/source/blender/python/api2_2x/Texture.c @@ -1496,13 +1496,12 @@ static int Texture_setFlags( BPy_Texture * self, PyObject * value ) static int Texture_setImage( BPy_Texture * self, PyObject * value ) { - PyObject *pyimg; Image *blimg = NULL; - if( !PyArg_ParseTuple( value, "O!", &Image_Type, &pyimg ) ) + if( !BPy_Image_Check (value) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected an Image" ); - blimg = Image_FromPyObject( pyimg ); + blimg = Image_FromPyObject( value ); if( self->texture->ima ) { self->texture->ima->id.us--; |