diff options
author | Ton Roosendaal <ton@blender.org> | 2006-11-15 18:18:06 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-11-15 18:18:06 +0300 |
commit | 3959fbcf1f6eb36e908d238b4ff608eb88b59d03 (patch) | |
tree | e55e2786b8059c1f8a543aee855266b019c9b99e /source/blender/src/drawnode.c | |
parent | 5d8efc975699ae5ca60aa2892d96dd3e361b9c1d (diff) |
Patch #5166, Juho V (bebraw)
New Composite Node: Flip (X/Y/both)
Diffstat (limited to 'source/blender/src/drawnode.c')
-rw-r--r-- | source/blender/src/drawnode.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c index 196086799c8..1e4f0d51bb5 100644 --- a/source/blender/src/drawnode.c +++ b/source/blender/src/drawnode.c @@ -941,6 +941,20 @@ static int node_composit_buts_filter(uiBlock *block, bNodeTree *ntree, bNode *no return 20; } +static int node_composit_buts_flip(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) +{ + if(block) { + uiBut *bt; + + /* flip x\y */ + bt=uiDefButS(block, MENU, B_NODE_EXEC+node->nr, "Flip X %x0|Flip Y %x1|Flip X & Y %x2", + butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, + &node->custom1, 0, 0, 0, 0, ""); + uiButSetFunc(bt, node_but_title_cb, node, bt); + } + return 20; +} + static int node_composit_buts_map_value(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr) { if(block) { @@ -1278,6 +1292,9 @@ static void node_composit_set_butfunc(bNodeType *ntype) case CMP_NODE_RGB: ntype->butfunc= node_buts_rgb; break; + case CMP_NODE_FLIP: + ntype->butfunc= node_composit_buts_flip; + break; case CMP_NODE_MIX_RGB: ntype->butfunc= node_buts_mix_rgb; break; |