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:
authorStephen Swaney <sswaney@centurytel.net>2005-09-24 19:28:59 +0400
committerStephen Swaney <sswaney@centurytel.net>2005-09-24 19:28:59 +0400
commit94aa84362604cbf421fa12bafa3472cc46aff049 (patch)
treede949fd1a862d203ae8feae2f640ff1157f0f784 /source/blender/python/api2_2x/Texture.c
parent0ce3341aaaeea41f61cbbfde892d1d216156f3bd (diff)
Patch #3099 - bugfix for #3097.
a little tweak for arg parsing. Contributed by Ken Hughes. Thanks!
Diffstat (limited to 'source/blender/python/api2_2x/Texture.c')
-rw-r--r--source/blender/python/api2_2x/Texture.c5
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--;