Cycles: Create proper sockets for OSL script nodes
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 25 Nov 2015 15:21:06 +0000 (20:21 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 25 Nov 2015 15:23:52 +0000 (20:23 +0500)
commitbbd33b3a8ec563372bf230204290f7338a35eb29
tree13cb58870530f6e4208bcb435ded59f42bbc7d72
parent50c08bdc0ec312afbd948121d9a072728ae54015
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
intern/cycles/blender/blender_shader.cpp
intern/cycles/render/nodes.cpp