diff options
author | Jacques Lucke <jacques@blender.org> | 2021-10-18 16:21:51 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-10-18 16:22:34 +0300 |
commit | de6bf5d4d2f1f832f8305c519fc88d8896ea9a0b (patch) | |
tree | f364034ebfb5b98537b0ce75162c2a38aa4bea46 /source/blender/blenkernel/BKE_node.h | |
parent | e150f171d5fb2b93277e55329b08e1ebd6dff631 (diff) |
Nodes: support sharing node declarations between nodes
Previously, every node had its own declaration. This isn't ideal, because
it's often the case that all nodes of the same type have the same declaration.
That's the case for all nodes using declarations currently. It will not be true
for e.g. group nodes in the future.
Sharing node declarations between nodes makes it a bit more efficient.
Differential Revision: https://developer.blender.org/D12898
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index d33c5e9940c..65e54be7db4 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -339,6 +339,10 @@ typedef struct bNodeType { /* Declares which sockets the node has. */ NodeDeclareFunction declare; + /* Different nodes of this type can have different declarations. */ + bool declaration_is_dynamic; + /* Declaration to be used when it is not dynamic. */ + NodeDeclarationHandle *fixed_declaration; /* RNA integration */ ExtensionRNA rna_ext; |