Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-10-14 14:44:22 +0400
committerTon Roosendaal <ton@blender.org>2008-10-14 14:44:22 +0400
commit882997ddffa4a2b7a77cc001001b26563bcbd9fa (patch)
treeb50da19dd281b4eb316c5fbaa1b3f2410b6e7ab7 /source/blender/src
parent0196890ebfb774903d8df2ef8ae440a051a5b8a0 (diff)
Bugfix #17830
Index OB pass didn't support FSA for Ztransp. Also made buttons to set black/white for non-RGBA images hide in Image Window, the Curves color code only supports 4 channels atm.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawimage.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index 8707e75cb09..84236a0701a 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -1616,19 +1616,21 @@ static void image_panel_curves(short cntrl) // IMAGE_HANDLER_CURVES
rect.ymin= 10; rect.ymax= 200;
curvemap_buttons(block, G.sima->cumap, 'c', B_SIMACURVES, B_REDR, &rect);
- bt=uiDefBut(block, BUT, B_SIMARANGE, "Reset", 10, 160, 90, 19, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves");
- uiButSetFunc(bt, image_panel_curves_reset, G.sima->cumap, ibuf);
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_SIMARANGE, "Min R:", 10, 120, 90, 19, G.sima->cumap->black, -1000.0f, 1000.0f, 10, 2, "Black level");
- uiDefButF(block, NUM, B_SIMARANGE, "Min G:", 10, 100, 90, 19, G.sima->cumap->black+1, -1000.0f, 1000.0f, 10, 2, "Black level");
- uiDefButF(block, NUM, B_SIMARANGE, "Min B:", 10, 80, 90, 19, G.sima->cumap->black+2, -1000.0f, 1000.0f, 10, 2, "Black level");
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_SIMARANGE, "Max R:", 10, 50, 90, 19, G.sima->cumap->white, -1000.0f, 1000.0f, 10, 2, "White level");
- uiDefButF(block, NUM, B_SIMARANGE, "Max G:", 10, 30, 90, 19, G.sima->cumap->white+1, -1000.0f, 1000.0f, 10, 2, "White level");
- uiDefButF(block, NUM, B_SIMARANGE, "Max B:", 10, 10, 90, 19, G.sima->cumap->white+2, -1000.0f, 1000.0f, 10, 2, "White level");
+ /* curvemap min/max only works for RGBA */
+ if(ibuf->channels==4) {
+ bt=uiDefBut(block, BUT, B_SIMARANGE, "Reset", 10, 160, 90, 19, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves");
+ uiButSetFunc(bt, image_panel_curves_reset, G.sima->cumap, ibuf);
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_SIMARANGE, "Min R:", 10, 120, 90, 19, G.sima->cumap->black, -1000.0f, 1000.0f, 10, 2, "Black level");
+ uiDefButF(block, NUM, B_SIMARANGE, "Min G:", 10, 100, 90, 19, G.sima->cumap->black+1, -1000.0f, 1000.0f, 10, 2, "Black level");
+ uiDefButF(block, NUM, B_SIMARANGE, "Min B:", 10, 80, 90, 19, G.sima->cumap->black+2, -1000.0f, 1000.0f, 10, 2, "Black level");
+
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_SIMARANGE, "Max R:", 10, 50, 90, 19, G.sima->cumap->white, -1000.0f, 1000.0f, 10, 2, "White level");
+ uiDefButF(block, NUM, B_SIMARANGE, "Max G:", 10, 30, 90, 19, G.sima->cumap->white+1, -1000.0f, 1000.0f, 10, 2, "White level");
+ uiDefButF(block, NUM, B_SIMARANGE, "Max B:", 10, 10, 90, 19, G.sima->cumap->white+2, -1000.0f, 1000.0f, 10, 2, "White level");
+ }
}
}