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/blenkernel/BKE_node.h | |
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/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 58fea6d462c..645b4410623 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -735,7 +735,9 @@ void nodeSetSocketAvailability(struct bNodeSocket *sock, bool is_available); int nodeSocketLinkLimit(const struct bNodeSocket *sock); -void nodeDeclarationEnsure(struct bNodeTree *ntree, struct bNode *node); +bool nodeDeclarationEnsure(struct bNodeTree *ntree, struct bNode *node); +bool nodeDeclarationEnsureOnOutdatedNode(struct bNodeTree *ntree, struct bNode *node); +void nodeSocketDeclarationsUpdate(struct bNode *node); /* Node Clipboard */ void BKE_node_clipboard_init(const struct bNodeTree *ntree); |