arnold-usd
arnold-usd copied to clipboard
Shader registry is returning pxr.Ndr.Property not Sdr.ShaderProperty objects
For example
import pxr prim = hou.node('/stage/editmaterialproperties1').stage().GetPrimAtPath(hou.parm('/stage/editmaterialproperties1/primpattern').eval()) prim
Usd.Prim(</materials/arnold_materialbuilder1/cell_noise1>)
ns = loputils._sdrNodes(prim)
ns[0]
arnold:cell_noise (context: 'arnold', version: '7.1', family: 'shader'); definition
URI: 'type(ns[0])
<class 'pxr.Sdr.ShaderNode'>
s = ns[0]
s.GetInputNames()
['additive', 'amplitude', 'color', 'coord_space', 'density', 'lacunarity', 'name', 'octaves', 'offset', 'P', 'palette', 'pattern', 'pref_name', 'r
andomness', 'scale', 'time']
prop = s.GetInput('color')
color (type: 'color3f'); input
type(prop)
<class 'pxr.Ndr.Property'>`
Note that s.GetShaderInput('color') is returning the Sdr.ShaderProperty, but in Houdini s.GetInput() is also returning this type for other registered shaders.
Issue synced internally to ARNOLD-13309