GafferHQ / gaffer

Gaffer is a node-based application for lookdev, lighting and automation
http://www.gafferhq.org
BSD 3-Clause "New" or "Revised" License
961 stars 207 forks source link

OSL nodes output doesn't match any other shading nodes #4184

Closed willDTF closed 3 years ago

willDTF commented 3 years ago

Version: Gaffer 0.59.5.0-linux Third-party tools: Arnold,

Description

A lot of OSL and MaterialX(in osl) nodes have a double 'out' parameters for no apparent reason almost all shader output can be find with node['out'], but osl node needs oslNode['out']['out']

this make an automated script construction process harder is it possible to remove the second ['out'] key to match other non osl nodes ?

Steps to reproduce

create a mx_texcoord_vector2 drag and drop the output to script editor to see ['mx_texcoord_vector2']['out']['out']

johnhaddon commented 3 years ago

All OSL shaders are treated this way, for the simple reason that OSL shaders can have multiple outputs. Removing the extra out container when there is a single output will actually result in more special cases rather than fewer.

willDTF commented 3 years ago

Hi John, thanks for the infos i close it then