PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.12k stars 1.22k forks source link

usdMtlx does not populate SdrProperty options #2594

Closed Derek-Nvidia closed 1 year ago

Derek-Nvidia commented 1 year ago

Description of Issue

The USDMtlx plugin does not populate the SdrProperty options.

Steps to Reproduce

Run the following Python code:

from pxr import Sdr

sdr_node = Sdr.Registry().GetShaderNodeByNameAndType("ND_image_color3", "mtlx")
sdr_property = sdr_node.GetShaderInput("vaddressmode")
print(f"options: {sdr_property.GetOptions()}")

It will print out the following: options: []

However I would expect it to print: options: [('constant', ''), ('clamp', ''), ('periodic', ''), ('mirror', '')]

System Information (OS, Hardware)

Windows

Package Versions

USD 22.11 MaterialX - 1.38.4

Build Flags

Derek-Nvidia commented 1 year ago

Actually I see this has already been addressed and is working in 23.08

spiffmon commented 1 year ago

I’m not positive it’s the problem, but MaterialX’s api had an issue with parsing some string lists. I think the issue has been resolved in more recent versions… can you try 23.08 with mtlx 1.37/1.38?

On Wed, Aug 16, 2023 at 4:31 AM Derek-Nvidia @.***> wrote:

Description of Issue Steps to Reproduce

Run the following Python code:

from pxr import Sdr

sdr_node = Sdr.Registry().GetShaderNodeByNameAndType("ND_image_color3", "mtlx") sdr_property = sdr_node.GetShaderInput("vaddressmode") print(f"options: {sdr_property.GetOptions()}")

It will print out the following: options: []

However I would expect it to print: options: [('constant', ''), ('clamp', ''), ('periodic', ''), ('mirror', '')] System Information (OS, Hardware)

Windows Package Versions

USD 22.11 MaterialX - 1.38.4 Build Flags

— Reply to this email directly, view it on GitHub https://github.com/PixarAnimationStudios/OpenUSD/issues/2594, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPOU2HFXKSQHX53N4YTY4LXVSVRFANCNFSM6AAAAAA3SMLT7M . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- --spiffiPhone