In MaterialX ND_UsdPreviewSurface_surfaceshader specifies the opacityMode input as type integer
<input name="opacityMode" type="integer" enum="transparent,presence" enumvalues="0,1" value="0" uiname="Opacity Mode" />
The UsdPreviewSurface specification defines it to be a token. I think this most closely matches the MaterialX concept of having a string input type with a enum attribute defining the supported types. This is in fact what we're already doing for wrapS and wrapT on ND_UsdUVTexture_23
<input name="wrapS" type="string" value="periodic" enum="black,clamp,periodic,mirror" uniform="true" />
<input name="wrapT" type="string" value="periodic" enum="black,clamp,periodic,mirror" uniform="true" />
I think we should follow the same pattern for opacityMode.
Aligning the types is important for the interchange between the two shading system nodes, but also because the current MaterialX convention using the enumvalues attribute it not supported by the UsdMtlx translation code.
In MaterialX
ND_UsdPreviewSurface_surfaceshaderspecifies theopacityModeinput as typeintegerThe UsdPreviewSurface specification defines it to be a
token. I think this most closely matches the MaterialX concept of having astringinput type with aenumattribute defining the supported types. This is in fact what we're already doing forwrapSandwrapTonND_UsdUVTexture_23I think we should follow the same pattern for
opacityMode.Aligning the types is important for the interchange between the two shading system nodes, but also because the current MaterialX convention using the
enumvaluesattribute it not supported by theUsdMtlxtranslation code.