-
Notifications
You must be signed in to change notification settings - Fork 23
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
loading FileResolver with pxr #3
Comments
Hey, thanks for checking out the repo! Good question! I'm actually not too familiar with how C++ Python bindings work under the hood, so I can't give you an answer as to if there is a way to auto import it. I'd recommend asking the same question in the USD forum, maybe someone there can give more insights how USD loads the plugins (or if this is just a general Python binding issue or if maybe some setup code is just missing). In our production code, we always just import the class somewhere ourselves (in startup scripts or the module that handles resolver related stuff). -Luca EDIT: Closing issue for now, please re-open if necessary :) |
Hey, I'm actually running into this issue again too currently with the "CachedResolver" implementation. Workarounds for now are:
Re-opening this ticket to re-investigate this some point in the future |
Thank you for your continued support of the plugin! |
Hello! This isn't really an issue with the plug-in but more of a question about best practices when loading it. Is there a recommended way of importing the FileResolver python module so that it's available any time usd is loaded. For example, I have the FileResolver loaded through the PXR_PLUGINPATH_NAME in usdview, but if I print out the contexts, I get an error because a python representation hasn't been created yet for the FileResolverContext:
after running:
from usdAssetResolver import FileResolver
it works fine:
st.GetPathResolverContext()
Ar.ResolverContext(FileResolver.ResolverContext('/assetResolverTest/test.usda'))
Do I need to go to each dcc (houdini/maya/usdview/etc) and add that import statement to it initialization or is there a better way?
Thank you!
The text was updated successfully, but these errors were encountered: