diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-10 16:20:10 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-10 16:20:10 +0400 |
commit | 75cbb07507fa39a1c65296321839cdfd245cc8d6 (patch) | |
tree | afebd7b2614e2e86119a7d240ad0623edf5d69fd /source/blender/editors/space_node/drawnode.c | |
parent | d0f4a2396b38c122b7e56de83532515ae8fa4381 (diff) |
Added option to composite/viewer nodes which specifys whether alpha input
is straight or not (premultiplied is default).
This is useful in cases when you want to check on output of such nodes
as keying which does have straight alpha output.
Also added missing do_version code to previous compo do_versions.
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 9b342ed8f44..9dd588e77ae 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2654,10 +2654,21 @@ static void node_composit_buts_ellipsemask(uiLayout *layout, bContext *UNUSED(C) uiItemR(layout, ptr, "mask_type", 0, NULL, ICON_NONE); } +static void node_composit_buts_composite(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "use_straight_alpha", 0, NULL, ICON_NONE); +} + +static void node_composit_buts_viewer(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "use_straight_alpha", 0, NULL, ICON_NONE); +} + static void node_composit_buts_viewer_but(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiLayout *col; + uiItemR(layout, ptr, "use_straight_alpha", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "tile_order", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "tile_order") == 0) { col = uiLayoutColumn(layout, TRUE); @@ -2965,10 +2976,13 @@ static void node_composit_set_butfunc(bNodeType *ntype) ntype->uifunc = node_composit_buts_bokehblur; break; case CMP_NODE_VIEWER: - ntype->uifunc = NULL; + ntype->uifunc = node_composit_buts_viewer; ntype->uifuncbut = node_composit_buts_viewer_but; ntype->uibackdropfunc = node_composit_backdrop_viewer; break; + case CMP_NODE_COMPOSITE: + ntype->uifunc = node_composit_buts_composite; + break; case CMP_NODE_MASK: ntype->uifunc = node_composit_buts_mask; break; |