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

Maya USD v24 error: "Could not open asset for reference introduced by" #3419

Closed
sharktacos opened this issue Oct 27, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@sharktacos
Copy link

sharktacos commented Oct 27, 2023

Describe the bug

In Maya USD v24 when I run this code to create a payload with the API:

def add_payload(prim: Usd.Prim, payload_asset_path: str, payload_target_path: Sdf.Path) -> None:
    payloads: Usd.Payloads = prim.GetPayloads()
    payloads.AddPayload(
        assetPath=payload_asset_path,
        primPath=payload_target_path 
    )

I get an error:

# Warning: In </asset>: Could not open asset @f:/shared_assets/USD/test/asset.usd@ for reference introduced by @f:/shared_assets/USD/test/asset_payload.usda@</donutThree>. (recomposing stage on stage @f:/shared_assets/USD/test/print_payload.usda@ <0000016FB2416CA0>)

I do not get this error in Maya USD v23.1 with the same code. So it appears that this is something particular to v24

If anyone has any ideas as to what may be going on, I'd be most appreciative!

Workaround: Reverting back to v23

EDIT: I think this may have something to do with how Maya-USD is writing relative path names. The above code writes them like this:

prepend payload = @./foobar_payload.usda@</foobar>

Maya (using the context menu in the Outliner) is writing them like this:

prepend payload = @foobar_payload.usda@

and FWIW, if I edit my USDA files and remove the "./" they read fine in Maya with USD v24.

I hope that is useful info. Frankly, this is all above my pay grade to sort out what's going on here!

Specs (if applicable):

  • Windows 10
  • Maya 2024.1
  • Maya USD v24
@sharktacos sharktacos added the bug Something isn't working label Oct 27, 2023
@santosd santosd assigned santosd and unassigned santosg87 Oct 31, 2023
@sharktacos
Copy link
Author

Closing this issue. The problem was not with Maya USD, but instead with my API code. I resolved this and everything is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants