diff options
author | Ken Hughes <khughes@pacific.edu> | 2005-12-10 02:19:00 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2005-12-10 02:19:00 +0300 |
commit | 080eb9b3fa2507db4bf0e849eead1b978b94307b (patch) | |
tree | bb1fcc8597390918da63aa00904fc3656ef9e699 /source/blender/python/api2_2x/Texture.c | |
parent | ccb285006c5924bc17781d93cc15c792aef4c3ce (diff) |
-- Bugfix #3564: Texture.getImage() always returned None for Env maps, even if
an image was assigned.
Diffstat (limited to 'source/blender/python/api2_2x/Texture.c')
-rw-r--r-- | source/blender/python/api2_2x/Texture.c | 10 |
1 files 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; } |