diff options
author | Andrea Weikert <elubie@gmx.net> | 2006-06-11 20:19:42 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2006-06-11 20:19:42 +0400 |
commit | 761190a14d230ca2811b55ce9cd8726e19851794 (patch) | |
tree | 8cb97acd31354dd02b769a26f4a38c134f7d6be5 /source/blender/src/interface_icons.c | |
parent | 962c81208b26a8d5b78739c003852465d64bf02c (diff) |
Fixed bug that the preview icon for world wasn't showing because sky is rendered with alpha=0
Temporary fix - rendering sky with alpha=1 could become render option in the future. Too risky to change now shortly before release.
Diffstat (limited to 'source/blender/src/interface_icons.c')
-rw-r--r-- | source/blender/src/interface_icons.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/src/interface_icons.c b/source/blender/src/interface_icons.c index 73fecbcea0e..dd131a61011 100644 --- a/source/blender/src/interface_icons.c +++ b/source/blender/src/interface_icons.c @@ -740,6 +740,17 @@ static void icon_set_image(ID *id, DrawInfo *di) icon_from_image((struct Image*)id, &ri); else { BIF_previewrender(id, &ri, NULL, PR_ICON_RENDER); + /* world is rendered with alpha=0, so it wasn't displayed + this could be render option for sky to, for later */ + if (GS(id->name) == ID_WO) { + char* cp= (char *)(ri.rect); + int x,y; + for(y=0; y<ri.pr_recty; y++) { + for(x=0; x<ri.pr_rectx; x++, cp+=4) { + cp[3]= 255; + } + } + } } /* and copy the image into the icon */ |