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_chromaMatte.cc')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_chromaMatte.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.cc b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.cc
index a7e3a1c148f..be27f747af0 100644
--- a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.cc
@@ -42,7 +42,7 @@ static void cmp_node_chroma_matte_declare(NodeDeclarationBuilder &b)
static void node_composit_init_chroma_matte(bNodeTree *UNUSED(ntree), bNode *node)
{
- NodeChroma *c = (NodeChroma *)MEM_callocN(sizeof(NodeChroma), "node chroma");
+ NodeChroma *c = MEM_cnew<NodeChroma>(__func__);
node->storage = c;
c->t1 = DEG2RADF(30.0f);
c->t2 = DEG2RADF(10.0f);
@@ -71,9 +71,10 @@ void register_node_type_cmp_chroma_matte()
{
static bNodeType ntype;
- cmp_node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW);
+ cmp_node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_chroma_matte_declare;
ntype.draw_buttons = node_composit_buts_chroma_matte;
+ ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_chroma_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);