From 080eb9b3fa2507db4bf0e849eead1b978b94307b Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Fri, 9 Dec 2005 23:19:00 +0000 Subject: [PATCH] -- Bugfix #3564: Texture.getImage() always returned None for Env maps, even if an image was assigned. --- source/blender/python/api2_2x/Texture.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c index 7f576069795..157f2e19cb7 100644 --- a/source/blender/python/api2_2x/Texture.c +++ b/source/blender/python/api2_2x/Texture.c @@ -1341,12 +1341,12 @@ static PyObject *Texture_getExtend( BPy_Texture * self ) static PyObject *Texture_getImage( BPy_Texture * self ) { /* we need this to be an IMAGE texture, and we must have an image */ - if( ( self->texture->type != TEX_IMAGE ) || !self->texture->ima ) { - Py_INCREF( Py_None ); - return Py_None; - } + if( ( self->texture->type == TEX_IMAGE || + self->texture->type == TEX_ENVMAP ) + && self->texture->ima ) + return Image_CreatePyObject( self->texture->ima ); - return Image_CreatePyObject( self->texture->ima ); + Py_RETURN_NONE; }