Registry should declare filenames as assets in GetTypeAsSdfType #1756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
Asset attributes of arnold shaders (e.g. image.filename) need to be declared as strings, as it was discussed here . However, the function
GetTypeAsSdfType
still needs to declare the attributes sdf type as being an asset, otherwise they get saved as string through mayaUSD / Lookdevx.But by just changing this, I had other usd errors because the default value was a string, whereas the sdf type was an asset. Making the default value an empty SdfAssetPath worked, but then in Lookdevx the default filename showed as
@@
in the UI, which is confusing and doesn't match what other texture nodes look like. Since these asset attributes only exist for 2 attributes and in practice those filenames always default to empty values, the best solution seemed to declare an empty VtValue for default value. In this case, everything works as expectedIssues fixed in this pull request
Fixes #1755