Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-08-30 18:13:46 +0300
committerJacques Lucke <jacques@blender.org>2021-08-30 18:23:05 +0300
commit1e69a25043120cc8dddc3f58622eb50e1443def1 (patch)
tree16bcb3eb98215dbbd5c54880cb3d14544e316d3f /source/blender/nodes/CMakeLists.txt
parente8684eff301d09e25b4e7ef6221a5289661da2e3 (diff)
Nodes: add more flexible method to declare sockets of a node
Previously, built-in nodes had to implement "socket templates" (`bNodeSocketTemplate`) to tell Blender which sockets they have. It was nice that this was declarative, but this approach was way too rigid and was cumbersome to use in many cases. This commit starts to move us away from this rigid structure by letting nodes implement a function that declares the sockets the node has. Right now this is used as a direct replacement of the "socket template" approach to keep the refactor smaller. It's just a bit easier to read and write. In the future we want to support more complex features like dynamic numbers of sockets and type inferencing. Those features will be easier to build on this new approach. This new approach can live side by side with `bNodeSocketTemplate` for a while. That makes it easier to update nodes one by one. Note: In `bNodeSocketTemplate` socket identifiers were made unique automatically. In this new approach, one has to specify unique identifiers manually (unless the name is unique already). Differential Revision: https://developer.blender.org/D12335
Diffstat (limited to 'source/blender/nodes/CMakeLists.txt')
-rw-r--r--source/blender/nodes/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 8dfab671565..29a1de381b5 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -347,6 +347,8 @@ set(SRC
intern/node_exec.cc
intern/node_geometry_exec.cc
intern/node_multi_function.cc
+ intern/node_declaration.cc
+ intern/node_socket_declarations.cc
intern/node_socket.cc
intern/node_tree_ref.cc
intern/node_util.c
@@ -367,6 +369,8 @@ set(SRC
NOD_geometry_nodes_eval_log.hh
NOD_math_functions.hh
NOD_multi_function.hh
+ NOD_node_declaration.hh
+ NOD_socket_declarations.hh
NOD_node_tree_ref.hh
NOD_shader.h
NOD_socket.h