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_socket.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_socket.cc')
-rw-r--r-- | source/blender/nodes/intern/node_socket.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 11356178d87..dce54d58dce 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -269,10 +269,11 @@ void node_verify_sockets(bNodeTree *ntree, bNode *node, bool do_id_user) return; } if (ntype->declare != nullptr) { - nodeDeclarationEnsure(ntree, node); + nodeDeclarationEnsureOnOutdatedNode(ntree, node); if (!node->declaration->matches(*node)) { refresh_node(*ntree, *node, *node->declaration, do_id_user); } + nodeSocketDeclarationsUpdate(node); return; } /* Don't try to match socket lists when there are no templates. |