Further work on the premul option for ton. This option

(which basically tells the renderer and compositor to expect a
key image) is now done at the image user level.

This does have some caveats, as image users don't always work
the way I thought they would/should (for example, the same image user
structure is apparently used in the uv image editor for all images,
which is kindof odd).

The UV image editor also now smartly detects if the premul option is
set and draws the image using key alpha, instead of premul

The subversion level was upped to convert the old premul flag, which was at
the image level, to the new one, which is at the image user level.
This commit is contained in:
2008-02-18 23:50:12 +00:00
parent 05a28c8521
commit ccac67d3ea
8 changed files with 81 additions and 37 deletions

View File

@@ -1140,7 +1140,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
tag_image_time(tex->ima); /* tag image as having being used */
/*do premul if necassary*/
if (tex->ima && tex->ima->flag & IMA_DO_PREMUL) {
if (tex->iuser.flag & IMA_DO_PREMUL) {
texres->tr *= texres->ta;
texres->tg *= texres->ta;
texres->tb *= texres->ta;