From 94aa84362604cbf421fa12bafa3472cc46aff049 Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Sat, 24 Sep 2005 15:28:59 +0000 Subject: Patch #3099 - bugfix for #3097. a little tweak for arg parsing. Contributed by Ken Hughes. Thanks! --- source/blender/python/api2_2x/Texture.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/python/api2_2x/Texture.c') 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--; -- cgit v1.2.3