Since maya-usd v0.27, when creating a mayaUsdProxyShape given a relative path to an existing usd file, the filePath attribute's value now encodes the current absolute path of the file, the current working directory is baked in the maya scene file.
Prior to v0.27, the relative path remained as such and was resolved later during the proxyShape's compute. Internally, the USD resolver had the capability to resolve it in the working directory (or in other search paths).
This new behaviour is problematic for us as we need to resolve usd files from maya scenes dynamically - as with USD default resolver - for our asset management needs.
The issue is very likely due to changes from #3482. Since the filePath attribute is flagged usedAsFileName, this affects behaviour of setAttr.
In our pipeline, we typically rely on environment variables for similar cases, eg file.filteTextureName set to $WORKSPACE_DIR/someImage.exr. Env var substitutions is not yet supported by mayaUsdProxyShape, but the approach could work also for us in this context.
Describe the bug
Since maya-usd v0.27, when creating a
mayaUsdProxyShape
given a relative path to an existing usd file, thefilePath
attribute's value now encodes the current absolute path of the file, the current working directory is baked in the maya scene file.Prior to v0.27, the relative path remained as such and was resolved later during the proxyShape's compute. Internally, the USD resolver had the capability to resolve it in the working directory (or in other search paths).
This new behaviour is problematic for us as we need to resolve usd files from maya scenes dynamically - as with USD default resolver - for our asset management needs.
Steps to reproduce
Specs (if applicable):
Additional context
The issue is very likely due to changes from #3482. Since the
filePath
attribute is flaggedusedAsFileName
, this affects behaviour ofsetAttr
.In our pipeline, we typically rely on environment variables for similar cases, eg
file.filteTextureName
set to$WORKSPACE_DIR/someImage.exr
. Env var substitutions is not yet supported by mayaUsdProxyShape, but the approach could work also for us in this context.