-- Bugfix #3564: Texture.getImage() always returned None for Env maps, even if

an image was assigned.
This commit is contained in:
Ken Hughes
2005-12-09 23:19:00 +00:00
parent ccb285006c
commit 080eb9b3fa

View File

@@ -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;
}