Texture button preview:

- now draws intensity value correct (black/white was inversed)
- added option to show texture alpha too
This commit is contained in:
2006-04-01 14:08:57 +00:00
parent 766e6fe321
commit 5468351d6e
4 changed files with 4863 additions and 4737 deletions

View File

@@ -298,6 +298,15 @@ static Scene *preview_prepare_scene(RenderInfo *ri, int id_type, ID *id, int pr_
Material *mat= give_current_material(base->object, base->object->actcol);
if(mat && mat->mtex[0]) {
mat->mtex[0]->tex= tex;
/* show alpha in this case */
if(tex==NULL || (tex->flag & TEX_PRV_ALPHA)) {
mat->mtex[0]->mapto |= MAP_ALPHA;
mat->alpha= 0.0f;
}
else {
mat->mtex[0]->mapto &= ~MAP_ALPHA;
mat->alpha= 1.0f;
}
}
}
}