OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

UsdPreviewSurface shader def documentation is not parsed into Sdr?

Open pablode opened this issue 6 months ago • 2 comments

Description of Issue

The MaterialX doc attribute is parsed into the Sdr help string, thanks to PR #1895.

For instance, for the node def ND_convert_float_surfaceshader, we get

>>> r = Sdr.Registry()
>>> mtlxNode = r.GetShaderNodeByIdentifier('ND_convert_float_surfaceshader')
>>> mtlxNode.GetHelp()
'Convert float to shader'

When I look at the UsdPreviewSurface shader node schema, I would expect the same to happen. However, the help string is empty:

>>> upsNode = r.GetShaderNodeByIdentifier('UsdUVTexture')
>>> upsNode.GetInfoString()
"UsdUVTexture (context: 'usda', version: '<invalid version>', family: 'UsdUVTexture'); definition URI: '/Users/pablode/USD/INSTALL/plugin/usd/usdShaders/resources/shaders/shaderDefs.usda'; implementation URI: '/Users/pablode/USD/INSTALL/plugin/usd/usdShaders/resources/shaders/uvTexture.glslfx'"
>>> upsNode.GetHelp()
''

Steps to Reproduce

  1. run the above commands in the usdview python shell

System Information (OS, Hardware)

MacBook Air M3, Sonoma 14.4.1

Package Versions

v24.05

Build Flags

--build BUILD --openimageio INSTALL --build-args OpenImageIO,"-DOIIO_BUILD_TOOLS=ON"

pablode avatar Aug 14 '24 20:08 pablode