Skip to content

Commit 765f342

Browse files
committed
Ar2 uses the parentPath as an anchor
This updates the ArResolver2.0 code path to use the source file as an anchor. This allows relative references to work with non-filename asset references. Usd Manager has some internal path manipulation to allow relative paths to work with plain file paths, but it needs to use the resolver plugin for non file paths. This logic already exists when dealing with the ArResolver1.0 API, but when the 2.0 i support was added this was overlooked. Signed-off-by: Peter Shinners <[email protected]>
1 parent 5a0da31 commit 765f342

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

usdmanager/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def expandPath(path, parentPath=None, sdf_format_args=None, extractedDir=None):
130130
if parentPath is None:
131131
anchoredPath = path
132132
elif hasattr(resolver, "CreateIdentifier"):
133-
anchoredPath = resolver.CreateIdentifier(path)
133+
anchor = resolver.Resolve(parentPath)
134+
anchoredPath = resolver.CreateIdentifier(path, anchor)
134135
else:
135136
anchoredPath = resolver.AnchorRelativePath(parentPath, path)
136137
resolved = resolver.Resolve(anchoredPath)

0 commit comments

Comments
 (0)