diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-29 16:10:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-29 21:30:16 +0300 |
commit | a70a435f28abc61f1b2d35c0bbc4d034ffaf4324 (patch) | |
tree | 1c445e4eb5def6f1231ead221bc607c005331c1a /intern/cycles/render/nodes.h | |
parent | af073e149b3c734f70bb13f20a4e18682885342e (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 { |