Here's an example:
Run this in the Python Shell:
asset_path = '/mnt/g/project/file.usd' ref_path = '/var/stuff/main.usd' print(hou.text.relpath(asset_path, ref_path))
Go to Windows > HScript Textport, then run this command
pathmap -a "/mnt/g" "G:"
Then in the Python Shell, run the print line again:
print(hou.text.relpath(asset_path, ref_path))
Now it prints out '/mnt/g/project/file.usd'
Is this a bug or expected behavior?
The reason this came up was because the built-in "Use Relative Paths" USD Output Processor uses hou.text.relpath and we noticed it was being affected by our custom path mappings in the way demonstrated above.
Hoping to get some clarity on this.