diff options
author | Robert Holcomb <bob_holcomb@hotmail.com> | 2007-02-07 21:24:51 +0300 |
---|---|---|
committer | Robert Holcomb <bob_holcomb@hotmail.com> | 2007-02-07 21:24:51 +0300 |
commit | 9e83e0edd201fcf2d37b8fbf24a5123785a7f384 (patch) | |
tree | 4801aa45ff52dbd6b09b4b8e0a21ecf8b397ed9e /source/blender/src/drawnode.c | |
parent | 6c6a9f42b22469a82a819b7794fb7e945647c207 (diff) |
Fixed chroma key to use tanf instead of tan (float vs double). Fixed input/output checking to prevent running the node if nothing is connected. Drawnode.c in error. will fix in a second.
Diffstat (limited to 'source/blender/src/drawnode.c')
-rw-r--r-- | source/blender/src/drawnode.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c index d3c086959f4..351a412e973 100644 --- a/source/blender/src/drawnode.c +++ b/source/blender/src/drawnode.c @@ -1391,6 +1391,26 @@ static int node_composit_buts_luma_matte(uiBlock *block, bNodeTree *ntree, bNode return 40; } +static int node_composit_buts_view_levels(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +{ + if(block) { + short sx= (butr->xmax-butr->xmin)/5; + + /*channel space selectors*/ + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"C", + butr->xmin,butr->ymin,sx,20,&node->custom1,1,1, 0, 0, "All Channels"); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"R", + butr->xmin+sx,butr->ymin,sx,20,&node->custom1,1,2, 0, 0, "Red Channel"); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"G", + butr->xmin+2*sx,butr->ymin,sx,20,&node->custom1,1,3, 0, 0, "Green Channel"); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"B", + butr->xmin+3*sx,butr->ymin,sx,20,&node->custom1,1,4, 0, 0, "Blue Channel"); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"Y", + butr->xmin+4*sx,butr->ymin,sx,20,&node->custom1,1,5, 0, 0, "Luminence Channel"); + } + return 20; +} + static int node_composit_buts_map_uv(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) { @@ -1608,6 +1628,9 @@ static void node_composit_set_butfunc(bNodeType *ntype) case CMP_NODE_MATH: ntype->butfunc= node_buts_math; break; + case CMP_NODE_VIEW_LEVELS: + ntype->butfunc=node_composit_buts_view_levels; + break; default: ntype->butfunc= NULL; } |