diff options
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_invert.cc')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_invert.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_invert.cc b/source/blender/nodes/composite/nodes/node_composite_invert.cc index dabf0452628..2243608d5c3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_invert.cc +++ b/source/blender/nodes/composite/nodes/node_composite_invert.cc @@ -21,6 +21,9 @@ * \ingroup cmpnodes */ +#include "UI_interface.h" +#include "UI_resources.h" + #include "node_composite_util.hh" /* **************** INVERT ******************** */ @@ -41,13 +44,23 @@ static void node_composit_init_invert(bNodeTree *UNUSED(ntree), bNode *node) node->custom1 |= CMP_CHAN_RGB; } +static void node_composit_buts_invert(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiLayout *col; + + col = uiLayoutColumn(layout, false); + uiItemR(col, ptr, "invert_rgb", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); + uiItemR(col, ptr, "invert_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); +} + /* custom1 = mix type */ -void register_node_type_cmp_invert(void) +void register_node_type_cmp_invert() { static bNodeType ntype; cmp_node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, 0); ntype.declare = blender::nodes::cmp_node_invert_declare; + ntype.draw_buttons = node_composit_buts_invert; node_type_init(&ntype, node_composit_init_invert); nodeRegisterType(&ntype); |