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

DefaultSearchPath resolver not working in 2024 #4061

Closed
mrharris opened this issue Jan 3, 2025 · 3 comments
Closed

DefaultSearchPath resolver not working in 2024 #4061

mrharris opened this issue Jan 3, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mrharris
Copy link

mrharris commented Jan 3, 2025

Describe the bug
Using PXR_AR_DEFAULT_SEARCH_PATH or SetDefaultSearchPath doesn't resolve the path in maya-2024, but it does work in maya-2022. It also works in maya-2025 but only if PXR_AR_DEFAULT_SEARCH_PATH is set before launching maya. So while it does work in maya-2025, we can no longer configure default paths in our userSetup.py which is a shame. I presume this secondary issue is related to PixarAnimationStudios/OpenUSD#2925, possibly resolved in usd-24.05

Steps to reproduce

  • set PXR_AR_DEFAULT_SEARCH_PATH = "C:/usd/a"
  • Open maya-2024 (tested as not working with 0.27-> 0.30)
import os
from pxr import Ar

# verify search path is set
print(os.environ["PXR_AR_DEFAULT_SEARCH_PATH"]) # "C:/usd/a"

# verify usd file exists
print(os.path.exists("C:/usd/a/data/ball.usd")) # True

# try resolve the usd file - fails in 2024
print(Ar.GetResolver().Resolve("data/ball.usd")) # None

Expected behavior
I would expect maya-2024 to resolve paths the same way as maya-2022 and maya-2025. Specifically it should resolve to C:/usd/a/data/ball.usd in the example above

@mrharris mrharris added the bug Something isn't working label Jan 3, 2025
@wallworm
Copy link
Collaborator

wallworm commented Jan 6, 2025

Thank you for reporting. We will look into this.

@wallworm
Copy link
Collaborator

wallworm commented Jan 6, 2025

I just tested this scenario of using PXR_AR_DEFAULT_SEARCH_PATH on my system using Maya USD 0.30 in Maya 2024.2, 2025.3 and current internal beta builds and it worked as expected. Maybe there is some extra piece to the puzzle regarding your setup in Maya 2024?

@mrharris
Copy link
Author

mrharris commented Jan 8, 2025

Thanks for checking Shawn. Apologies this was indeed something in my setup - it was caused by having nvidia's omniverse maya module in the environment. Preventing omniverse from loading restored the maya-usd resolver behviour. Thanks again

@mrharris mrharris closed this as completed Jan 8, 2025
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