diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-25 18:21:06 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-25 18:23:52 +0300 |
commit | bbd33b3a8ec563372bf230204290f7338a35eb29 (patch) | |
tree | 13cb58870530f6e4208bcb435ded59f42bbc7d72 /intern/cycles/render/nodes.cpp | |
parent | 50c08bdc0ec312afbd948121d9a072728ae54015 (diff) |
Cycles: Create proper sockets for OSL script nodes
Previously render nodes will be always created with just a VECTOR socket
type and then those sockets will try to be set as all point, vector and
normal to work around lack of such a subtype distinguishing in blender.
This change makes it so subtype is being queried from OSL itself and
proper subtupe is being used for socket.
It's still not in use for the official builds because it requires changes
applied recently on the 1.7 branch of OSL:
https://github.com/imageworks/OpenShadingLanguage/commit/f70e58f
This solves artists confusion reported in T46117.
Reviewers: #cycles, juicyfruit
Reviewed By: #cycles, juicyfruit
Subscribers: juicyfruit
Differential Revision: https://developer.blender.org/D1627
Diffstat (limited to 'intern/cycles/render/nodes.cpp')
-rw-r--r-- | intern/cycles/render/nodes.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 1594e8822db..e661b0b176e 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -4478,6 +4478,7 @@ void OSLScriptNode::compile(SVMCompiler& /*compiler*/) void OSLScriptNode::compile(OSLCompiler& compiler) { +#if OSL_LIBRARY_VERSION_CODE < 10701 /* XXX fix for #36790: * point and normal parameters are reflected as generic SOCK_VECTOR sockets * on the node. Socket fixed input values need to be copied explicitly here for @@ -4497,6 +4498,7 @@ void OSLScriptNode::compile(OSLCompiler& compiler) } } } +#endif if(!filepath.empty()) compiler.add(this, filepath.c_str(), true); |