Fix path resolving issue when usd files are used in different systems#2492
Merged
sebastienblor merged 2 commits intoAutodesk:masterfrom Dec 5, 2025
Merged
Fix path resolving issue when usd files are used in different systems#2492sebastienblor merged 2 commits intoAutodesk:masterfrom
sebastienblor merged 2 commits intoAutodesk:masterfrom
Conversation
cpichard
approved these changes
Dec 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When usd doesn't manage to resolve a usd path (in particular due to tokens like udims), we still to resolve it properly by asking each layer if the path corresponds to a file on disk. In order to help this process, a "./" needs to be added at the beginning of the filename.
However, when usd still doesn't manage to resolve the path, we're keeping the "./" at the beginning of the arnold filename.
This isn't correct in specific use cases, when the usd file is loaded in a different system than it was exported.
For example, when we export a scene from maya or max on windows, the ocio configuration is authored with an absolute path (C:/Program Files/Autodesk/etc...), and when we render it on linux, TfIsRelativePath returns true. Because of that, arnold ends up with a path set to "./C:/Program Files/etc...." which prevents from using path mapping properly.