diff options
author | Aaron Carlisle <Blendify> | 2021-12-04 04:26:10 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-04 04:26:38 +0300 |
commit | 5ef5a9fc24668aa264fe0558db9c0fb1246aa37f (patch) | |
tree | 0730bf610408fac2dd9c7281fdc0627245d7a494 /source/blender/nodes/composite/nodes/node_composite_directionalblur.cc | |
parent | d5920744f4429423e89a56112ede8a8ea87ccbbb (diff) |
Compositor: Migrate most nodes to new socket builder API
This patch leaves a out a few nodes:
- Group Nodes
- Image input node
- File output node
- Switch View
- Cryptomatte
These nodes above are a bit more complicated and should be worked on individually.
Differential Revision: https://developer.blender.org/D13266
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_directionalblur.cc')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_directionalblur.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc b/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc index d9f82ba5009..4250938aa44 100644 --- a/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc +++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc @@ -23,10 +23,15 @@ #include "node_composite_util.hh" -static bNodeSocketTemplate cmp_node_dblur_in[] = {{SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, - {-1, ""}}; +namespace blender::nodes { -static bNodeSocketTemplate cmp_node_dblur_out[] = {{SOCK_RGBA, N_("Image")}, {-1, ""}}; +static void cmp_node_directional_blur_declare(NodeDeclarationBuilder &b) +{ + b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); + b.add_output<decl::Color>(N_("Image")); +} + +} // namespace blender::nodes static void node_composit_init_dblur(bNodeTree *UNUSED(ntree), bNode *node) { @@ -42,7 +47,7 @@ void register_node_type_cmp_dblur(void) static bNodeType ntype; cmp_node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, 0); - node_type_socket_templates(&ntype, cmp_node_dblur_in, cmp_node_dblur_out); + ntype.declare = blender::nodes::cmp_node_directional_blur_declare; node_type_init(&ntype, node_composit_init_dblur); node_type_storage( &ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage); |