diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-29 16:10:34 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2016-06-08 22:45:40 +0300 |
commit | 56f89666eefe064f00cef2af270f0d014eb673f7 (patch) | |
tree | ce8ab56fb2e062094824941ed2d56bb98ab1a631 /intern/cycles/render/nodes.h | |
parent | 10d3acacf6bc630141796137beb506cd2478eccd (diff) |
Code refactor: centralize OSL node creation in shader manager.
Diffstat (limited to 'intern/cycles/render/nodes.h')
-rw-r--r-- | intern/cycles/render/nodes.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h index 43dc1dd26fe..9ece9b86eac 100644 --- a/intern/cycles/render/nodes.h +++ b/intern/cycles/render/nodes.h @@ -966,17 +966,22 @@ public: SHADER_NODE_CLASS(SetNormalNode) }; -class OSLScriptNode : public ShaderNode { +class OSLNode : public ShaderNode { public: - SHADER_NODE_CLASS(OSLScriptNode) + static OSLNode *create(size_t num_inputs); + ~OSLNode(); + + SHADER_NODE_BASE_CLASS(OSLNode) /* ideally we could beter detect this, but we can't query this now */ bool has_spatial_varying() { return true; } + virtual bool equals(const ShaderNode * /*other*/) { return false; } string filepath; string bytecode_hash; - virtual bool equals(const ShaderNode * /*other*/) { return false; } +private: + OSLNode(); }; class NormalMapNode : public ShaderNode { |