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:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-12-08 05:05:13 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-12-08 05:05:13 +0300
commit333dc7b5c4ee44986294c6b5683fa4813454279b (patch)
treee2341a03b9310207833517a7e970d9e94d37bac4 /source/blender/nodes/NOD_socket_declarations.hh
parent0d8c479225d754ba376e442d56ffa935956427cf (diff)
Nodes: Add Shader Socket to new decleration API
This commit adds the shader socket type to the new socket builder api. Re commits part of rB0bd3cad04edf4bf9b9d3b1353f955534aa5e6740
Diffstat (limited to 'source/blender/nodes/NOD_socket_declarations.hh')
-rw-r--r--source/blender/nodes/NOD_socket_declarations.hh15
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 89bc198f97e..98c8fa68876 100644
--- a/source/blender/nodes/NOD_socket_declarations.hh
+++ b/source/blender/nodes/NOD_socket_declarations.hh
@@ -213,6 +213,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
* \{ */