diff options
author | Joseph Eagar <joeedh@gmail.com> | 2008-02-19 02:50:12 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2008-02-19 02:50:12 +0300 |
commit | ccac67d3eae4684e86b2a8a4858e9b173f520270 (patch) | |
tree | 1e645fc6b61e352b3436b8610676ed66ae640980 /source/blender/src/drawnode.c | |
parent | 05a28c8521c04e86accfd5999c3cf5b7dbb07929 (diff) |
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.
Diffstat (limited to 'source/blender/src/drawnode.c')
-rw-r--r-- | source/blender/src/drawnode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c index 54475eb362e..5b4975401b3 100644 --- a/source/blender/src/drawnode.c +++ b/source/blender/src/drawnode.c @@ -938,7 +938,7 @@ static void image_layer_cb(void *ima_v, void *iuser_v) { ntreeCompositForceHidden(G.scene->nodetree); - BKE_image_multilayer_index(ima_v, iuser_v); + BKE_image_multilayer_index(BKE_image_get_renderresult(ima_v), iuser_v); allqueue(REDRAWNODE, 0); } @@ -995,6 +995,11 @@ static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *nod uiButSetFunc(bt, node_image_type_cb, node, ima); MEM_freeN(strp); + if (iuser) { + dy -= 19; + uiDefButBitS(block, TOG, IMA_DO_PREMUL, B_NODE_EXEC+node->nr, "Premul", xmin, dy, xmax-xmin, 20, &iuser->flag, 0, 0, 0, 0, "Toggles whether to premultiply the image at render/composite time."); + } + if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE) ) { width= (xmax-xmin)/2; @@ -1034,7 +1039,7 @@ static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *nod } if(node->id) { Image *ima= (Image *)node->id; - int retval= 19; + int retval= 19*2; /* for each draw we test for anim refresh event */ if(iuser->flag & IMA_ANIM_REFRESHED) { |