From d3ad04172de2b928aeb561b74a58996586b1db1c Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 3 Jan 2022 19:32:33 -0500 Subject: Cleanup: Remove bNodeType flag from base registration functions This flag is only used a few small cases, so instead of setting the flag for every node only set the required flag for the nodes that require it. Mostly the flag is used to set `ntype.flag = NODE_PREVIEW` For nodes that should have previews by default which is only some compositor nodes and some texture nodes. The frame node also sets the `NODE_BACKGROUND` flag. All other nodes were setting a flag of 0 which has no purpose. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13699 --- source/blender/nodes/shader/nodes/node_shader_normal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/nodes/shader/nodes/node_shader_normal.cc') diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.cc b/source/blender/nodes/shader/nodes/node_shader_normal.cc index d448ca79501..e8a97b904d3 100644 --- a/source/blender/nodes/shader/nodes/node_shader_normal.cc +++ b/source/blender/nodes/shader/nodes/node_shader_normal.cc @@ -74,7 +74,7 @@ void register_node_type_sh_normal() static bNodeType ntype; - sh_node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, 0); + sh_node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR); node_type_socket_templates(&ntype, file_ns::sh_node_normal_in, file_ns::sh_node_normal_out); node_type_exec(&ntype, nullptr, nullptr, file_ns::node_shader_exec_normal); node_type_gpu(&ntype, file_ns::gpu_shader_normal); -- cgit v1.2.3