diff options
author | Aaron Carlisle <Blendify> | 2021-12-06 19:59:26 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-06 19:59:52 +0300 |
commit | 0bd3cad04edf4bf9b9d3b1353f955534aa5e6740 (patch) | |
tree | 1ab5bd8afd56508e8672b6448dd8462e1941fb40 /source/blender/nodes/NOD_socket_declarations.hh | |
parent | f72cc47d8edf849af98e196f721022bacf86a5e7 (diff) |
Nodes: Add Shader Socket to new decleration API
This commit adds the shader socket type to the new socket builder api.
As a test, this commit also converts the Add Shader node to the new API
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D13485
Diffstat (limited to 'source/blender/nodes/NOD_socket_declarations.hh')
-rw-r--r-- | source/blender/nodes/NOD_socket_declarations.hh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_socket_declarations.hh b/source/blender/nodes/NOD_socket_declarations.hh index 7cb32a37ae2..7284accd1ec 100644 --- a/source/blender/nodes/NOD_socket_declarations.hh +++ b/source/blender/nodes/NOD_socket_declarations.hh @@ -212,6 +212,21 @@ class Image : public IDSocketDeclaration { Image(); }; +class ShaderBuilder; + +class Shader : public SocketDeclaration { + private: + friend ShaderBuilder; + + public: + using Builder = ShaderBuilder; + + bNodeSocket &build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const override; + bool matches(const bNodeSocket &socket) const override; +}; + +class ShaderBuilder : public SocketDeclarationBuilder<Shader> {}; + /* -------------------------------------------------------------------- */ /** \name #FloatBuilder Inline Methods * \{ */ |