-- Bugfix #3564: Texture.getImage() always returned None for Env maps, even if
an image was assigned.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user