diff options
author | Aaron Carlisle <Blendify> | 2022-01-04 03:32:33 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-01-04 03:33:14 +0300 |
commit | d3ad04172de2b928aeb561b74a58996586b1db1c (patch) | |
tree | 31c38b7b942d0295ee9b1f9f083c19f98036d71a /source/blender/nodes/composite/nodes/node_composite_viewer.cc | |
parent | 9793bc30cec959cce7a23d3b75a772f39cc3d721 (diff) |
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
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_viewer.cc')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_viewer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_viewer.cc b/source/blender/nodes/composite/nodes/node_composite_viewer.cc index 6cc6f822279..ba3d620a1aa 100644 --- a/source/blender/nodes/composite/nodes/node_composite_viewer.cc +++ b/source/blender/nodes/composite/nodes/node_composite_viewer.cc @@ -77,10 +77,11 @@ void register_node_type_cmp_viewer() { static bNodeType ntype; - cmp_node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW); + cmp_node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT); ntype.declare = blender::nodes::cmp_node_viewer_declare; ntype.draw_buttons = node_composit_buts_viewer; ntype.draw_buttons_ex = node_composit_buts_viewer_ex; + ntype.flag |= NODE_PREVIEW; node_type_init(&ntype, node_composit_init_viewer); node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); |