Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't let UsdUtilsModifyAssetPaths change the length of asset array attributes/metadata #3063

Conversation

marktucker
Copy link
Contributor

Description of Change(s)

When modifying asset paths in a layer, don't remove empty elements from arrays. The empty elements may be meaningful, as in primvars that must be a specific length. Updated the output of the ModifyAssetPaths "removal" test, which validates the behavior of this API when modified asset paths are empty.

Arguably, this change should perhaps be limited to USD attributes (not metadata), but depending on the use case changing the array length is still throwing away what may be important information in a pipeline.

I also considered whether an array that has all values set to empty asset paths should remove the attribute. This seems more defensible to me, but again, I'm not sure the length of the array couldn't still be considered useful information that is worth preserving in some circumstances.

I'm open to different answers on these two questions, and I believe each could be addressed without too drastic changes to this PR.

Fixes Issue(s)

arrays. The empty elements may be meaningful, as in primvars that must
be a specific length.
…erve

the length of any asset array data even when returned asset paths are empty.
@jesschimein
Copy link
Contributor

Filed as internal issue #USD-9598

@jesschimein
Copy link
Contributor

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pixar-oss pixar-oss closed this in cdabf17 Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants