We are running into issues with rendering through HUSK and using our custom ArResolver plugin.
It seems like HUSK doesn't use the resolver and the CreateDefaultContextForAsset() method doesn't get called at the render step.
The strange thing is that if we add something like this to the preRenderScript:
# Re-open stage to trigger USDResolverstage:Usd.Stage# set by husk before this python file is runstageFilePath=stage.GetRootLayer().realPathstage=Usd.Stage.Open(stageFilePath)stage.Reload()
I can see that the resolver does work, just not when it comes to the actual rendering.
We copy the env from the Houdini session where everything is working correctly.
Just to be clear, you want CreateDefaultContextForAsset() to be called on ./file.usd as the "asset"? Or are you looking for a way to configure husk more flexibly to control the asset resolver context?
Thanks. Mark E has informed me that there is in fact an option on husk already to specify the asset to use for the resolver context (--resolver-context ./file.usd). So hopefully you can use that as a workaround for now. However I think you're right that if no explicit resolver context is provided, we should be using the "main" usd file as the resolver context asset.