Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_premulkey.c')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_premulkey.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_premulkey.c b/source/blender/nodes/composite/nodes/node_composite_premulkey.c
index 7f7b7692b02..bfc5a54cf73 100644
--- a/source/blender/nodes/composite/nodes/node_composite_premulkey.c
+++ b/source/blender/nodes/composite/nodes/node_composite_premulkey.c
@@ -44,37 +44,12 @@ static bNodeSocketTemplate cmp_node_premulkey_out[] = {
{ -1, 0, "" }
};
-#ifdef WITH_COMPOSITOR_LEGACY
-
-static void node_composit_exec_premulkey(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
-{
- if (out[0]->hasoutput==0)
- return;
-
- if (in[0]->data) {
- CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
-
- stackbuf= dupalloc_compbuf(cbuf);
- premul_compbuf(stackbuf, node->custom1 == 1);
-
- out[0]->data = stackbuf;
- if (cbuf != in[0]->data)
- free_compbuf(cbuf);
- }
-}
-
-#endif /* WITH_COMPOSITOR_LEGACY */
-
-void register_node_type_cmp_premulkey(bNodeTreeType *ttype)
+void register_node_type_cmp_premulkey(void)
{
static bNodeType ntype;
- node_type_base(ttype, &ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ cmp_node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_premulkey_in, cmp_node_premulkey_out);
- node_type_size(&ntype, 140, 100, 320);
-#ifdef WITH_COMPOSITOR_LEGACY
- node_type_exec(&ntype, node_composit_exec_premulkey);
-#endif
- nodeRegisterType(ttype, &ntype);
+ nodeRegisterType(&ntype);
}