diff options
author | Robert Holcomb <bob_holcomb@hotmail.com> | 2007-01-09 07:32:39 +0300 |
---|---|---|
committer | Robert Holcomb <bob_holcomb@hotmail.com> | 2007-01-09 07:32:39 +0300 |
commit | cc359a6fd5049a995b2b3145c3ed6580f4dc02a0 (patch) | |
tree | 372a13ab7079e6407dfa73f962944171fe796b02 /source/blender/src/drawnode.c | |
parent | 3b15461a4a0149ff29d4e4afeafbd1468335870d (diff) |
Format corrections.
Diffstat (limited to 'source/blender/src/drawnode.c')
-rw-r--r-- | source/blender/src/drawnode.c | 113 |
1 files changed, 53 insertions, 60 deletions
diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c index 010d442557b..fecdaea3866 100644 --- a/source/blender/src/drawnode.c +++ b/source/blender/src/drawnode.c @@ -1336,66 +1336,59 @@ static int node_composit_buts_chroma_matte(uiBlock *block, bNodeTree *ntree, bNo static int node_composit_buts_channel_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) { - if(block) { - short sx= (butr->xmax-butr->xmin)/4; - short cx= (butr->xmax-butr->xmin)/3; - NodeChroma *c=node->storage; - char *c1, *c2, *c3; - - /*color space selectors*/ - uiBlockBeginAlign(block); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"RGB", - butr->xmin,butr->ymin+60,sx,20, - &node->custom1,1,1, 0, 0, "RGB Color Space"); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"HSV", - butr->xmin+sx,butr->ymin+60,sx,20, - &node->custom1,1,2, 0, 0, "HSV Color Space"); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"YUV", - butr->xmin+2*sx,butr->ymin+60,sx,20, - &node->custom1,1,3, 0, 0, "YUV Color Space"); - uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"YCC", - butr->xmin+3*sx,butr->ymin+60,sx,20, - &node->custom1,1,4, 0, 0, "YCbCr Color Space"); - - if (node->custom1==1) { - c1="R"; c2="G"; c3="B"; - } - else if(node->custom1==2){ - c1="H"; c2="S"; c3="V"; - } - else if(node->custom1==3){ - c1="Y"; c2="U"; c3="V"; - } - else { // if(node->custom1==4){ - c1="Y"; c2="Cb"; c3="Cr"; - } - - /*channel selector */ - uiDefButS(block, ROW, B_NODE_EXEC+node->nr, c1, - butr->xmin,butr->ymin+40,cx,20, - &node->custom2,1, 1, 0, 0, "Channel 1"); - uiDefButS(block, ROW, B_NODE_EXEC+node->nr, c2, - butr->xmin+cx,butr->ymin+40,cx,20, - &node->custom2,1, 2, 0, 0, "Channel 2"); - uiDefButS(block, ROW, B_NODE_EXEC+node->nr, c3, - butr->xmin+cx+cx,butr->ymin+40,cx,20, - &node->custom2, 1, 3, 0, 0, "Channel 3"); - - /*tolerance sliders */ - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "High ", - butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20, - &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque"); - uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Low ", - butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, - &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed"); - uiBlockEndAlign(block); - - /*keep t2 (low) less than t1 (high) */ - if(c->t2 > c->t1) { - c->t2=c->t1; - } - } - return 80; + if(block) { + short sx= (butr->xmax-butr->xmin)/4; + short cx= (butr->xmax-butr->xmin)/3; + NodeChroma *c=node->storage; + char *c1, *c2, *c3; + + /*color space selectors*/ + uiBlockBeginAlign(block); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"RGB", + butr->xmin,butr->ymin+60,sx,20,&node->custom1,1,1, 0, 0, "RGB Color Space"); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"HSV", + butr->xmin+sx,butr->ymin+60,sx,20,&node->custom1,1,2, 0, 0, "HSV Color Space"); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"YUV", + butr->xmin+2*sx,butr->ymin+60,sx,20,&node->custom1,1,3, 0, 0, "YUV Color Space"); + uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"YCC", + butr->xmin+3*sx,butr->ymin+60,sx,20,&node->custom1,1,4, 0, 0, "YCbCr Color Space"); + + if (node->custom1==1) { + c1="R"; c2="G"; c3="B"; + } + else if(node->custom1==2){ + c1="H"; c2="S"; c3="V"; + } + else if(node->custom1==3){ + c1="Y"; c2="U"; c3="V"; + } + else { // if(node->custom1==4){ + c1="Y"; c2="Cb"; c3="Cr"; + } + + /*channel selector */ + uiDefButS(block, ROW, B_NODE_EXEC+node->nr, c1, + butr->xmin,butr->ymin+40,cx,20,&node->custom2,1, 1, 0, 0, "Channel 1"); + uiDefButS(block, ROW, B_NODE_EXEC+node->nr, c2, + butr->xmin+cx,butr->ymin+40,cx,20,&node->custom2,1, 2, 0, 0, "Channel 2"); + uiDefButS(block, ROW, B_NODE_EXEC+node->nr, c3, + butr->xmin+cx+cx,butr->ymin+40,cx,20,&node->custom2, 1, 3, 0, 0, "Channel 3"); + + /*tolerance sliders */ + uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "High ", + butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20, + &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque"); + uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Low ", + butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, + &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed"); + uiBlockEndAlign(block); + + /*keep t2 (low) less than t1 (high) */ + if(c->t2 > c->t1) { + c->t2=c->t1; + } + } + return 80; } static int node_composit_buts_map_uv(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) |