diff options
author | Joseph Eagar <joeedh@gmail.com> | 2008-02-23 01:23:58 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2008-02-23 01:23:58 +0300 |
commit | 0e233b3213a21449399d91b9ee841c235fbba4d7 (patch) | |
tree | da61feed9bf0d7274c7725f909e170a39d0e1561 /source/blender/src | |
parent | 28fb57804835e41f51da9bfdecda6b49ede439f2 (diff) |
=Reversion of premul bugfix=
Reversion of premul bugfix, as it was apparently not
working all that well.
Note that this brings back the bug where the erase alpha
paint tool won't display correctly, since the UV image
editor just draws images in key alpha now.
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/buttons_shading.c | 5 | ||||
-rw-r--r-- | source/blender/src/drawimage.c | 6 | ||||
-rw-r--r-- | source/blender/src/drawnode.c | 9 |
3 files changed, 6 insertions, 14 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 7945b6bacd3..0325128daa2 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -1181,7 +1181,7 @@ void uiblock_image_panel(uiBlock *block, Image **ima_pp, ImageUser *iuser, uiBlockSetFunc(block, image_reload_cb, ima, iuser); uiDefButBitS(block, TOG, IMA_ANTIALI, B_NOP, "Anti", 10, 50, 45, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors"); - uiDefButBitS(block, TOG, IMA_DO_PREMUL, imagechanged, "Premul", 55, 50, 65, 20, &iuser->flag, 0, 0, 0, 0, "Toggles whether to premultiply the image at render/composite time."); + uiDefButBitS(block, TOG, IMA_DO_PREMUL, imagechanged, "Premul", 55, 50, 65, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha"); uiBlockEndAlign(block); if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { @@ -2560,7 +2560,7 @@ static void lamp_panel_spot(Object *ob, Lamp *la) tip= "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"; else if(la->buftype==LA_SHADBUF_HALFWAY) tip= "Regular buffer, averaging the closest and 2nd closest Z value for reducing biasing"; - + uiDefButC(block, MENU, B_REDR, "Classical %x0|Classic-Halfway %x2|Irregular %x1", 10,140,80,19,&la->buftype, 0, 0, 0, 0, tip); } } @@ -2656,6 +2656,7 @@ static void lamp_panel_spot(Object *ob, Lamp *la) } } + } else uiDefBut(block, LABEL,0," ", 100,180,200,19,NULL, 0, 0, 0, 0, ""); diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 3db93cdba02..da00e644a6b 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -2058,11 +2058,7 @@ void drawimagespace(ScrArea *sa, void *spacedata) if(sima->flag & SI_USE_ALPHA) { sima_draw_alpha_backdrop(sima, x1_rep, y1_rep, ibuf->x*xuser_asp, ibuf->y*yuser_asp); glEnable(GL_BLEND); - /*use key alpha if the IMA_DO_PREMUL option is set.*/ - if (sima->iuser.flag & IMA_DO_PREMUL) - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - else - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } /* detect if we need to redo the curve map. diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c index 5b4975401b3..54475eb362e 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(BKE_image_get_renderresult(ima_v), iuser_v); + BKE_image_multilayer_index(ima_v, iuser_v); allqueue(REDRAWNODE, 0); } @@ -995,11 +995,6 @@ 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; @@ -1039,7 +1034,7 @@ static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *nod } if(node->id) { Image *ima= (Image *)node->id; - int retval= 19*2; + int retval= 19; /* for each draw we test for anim refresh event */ if(iuser->flag & IMA_ANIM_REFRESHED) { |