diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-08 14:23:50 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-08 14:24:01 +0300 |
commit | fc373af8f5a43553a8f9cdb86f8e18c78040a537 (patch) | |
tree | 0035cff54e8a5b3b9a6aea78eb67e8191eb91eaf /source/blender/nodes/intern/node_declaration.cc | |
parent | 09cef0fc00dc4b699b8bae5d8b8f73d613ccdf9a (diff) |
Nodes: store socket declaration reference in socket
Previously, to get the declaration of a socket, one had to go
through `node->declaration`. Now this indirection is not necessary
anymore. This makes it easier to add more per-socket information
into the declaration and accessing it in various places.
Currently, this system is used by socket descriptions and node warnings
for unsupported geometry component types.
Diffstat (limited to 'source/blender/nodes/intern/node_declaration.cc')
-rw-r--r-- | source/blender/nodes/intern/node_declaration.cc | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/source/blender/nodes/intern/node_declaration.cc b/source/blender/nodes/intern/node_declaration.cc index 8a38b68ec59..e804d10ad75 100644 --- a/source/blender/nodes/intern/node_declaration.cc +++ b/source/blender/nodes/intern/node_declaration.cc @@ -20,16 +20,6 @@ namespace blender::nodes { -void NodeDeclaration::build(bNodeTree &ntree, bNode &node) const -{ - for (const SocketDeclarationPtr &decl : inputs_) { - decl->build(ntree, node, SOCK_IN); - } - for (const SocketDeclarationPtr &decl : outputs_) { - decl->build(ntree, node, SOCK_OUT); - } -} - bool NodeDeclaration::matches(const bNode &node) const { auto check_sockets = [&](ListBase sockets, Span<SocketDeclarationPtr> socket_decls) { |