You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening a USD file which uses anchored file paths from a mounted volume in windows doesn't work. The resolved volume GUID is not properly formatted and so the system cannot find the files. MayaUSD reports the volume GUID is something like C:\??\Volume{009b65f5-0000-0000-0004-000000000000}\RTS\referenced_files\USD\barrelTests\Library\Assets\Barrels\Textures\repacked_BarrelWithLid\repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png.
According to the documentation on volume GUIDs the format of the volume GUID is not correct. The string should be something like \\?\Volume{{009b65f5-0000-0000-0004-000000000000}\the\rest\of\the\path.
Debugging the code, what I see happen is:
There is a call to _WalkGraph in materialParamUtils.cpp for the shader node. That call finds the usd shade input attribute and calls UsdImaging_ResolveMaterialParamValue on it. The starting value of the assetPath looks like ../Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png
As a part of resolving the path there is a call to SdfComputeAssetPathRelativeToLayer. After this call the resolved path is correct. If I copy that string from the debugger I can get windows to open it. The resolved path is: d:/MAYA-105710/RTS/referenced_files/USD/barrelTests/Library/Assets/Barrels/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_1001_BaseColor.png. The code still has to replace the 1001 with again, but that part of the code just hasn't execute yet. This path is correct and can be correctly opened.
Before resolving finishes there is a call to _ResolveSymlinks. This discovers that d:\MAYA-105710 is a IO_REPARSE_TAG_MOUNT_POINT and returns the contents of the mount point reparse buffer, which are \\??\\Volume{e7716c21-89be-11eb-bea8-50e085f32ec9}\\
Eventually, the incorrect volume GUID path gets concatenated with the rest of the path, and HdVP2Material tries to find the UDIM textures, but none of them work because the path is not correct.
The changes in pull request #1378 add support for handling windows symbolic links. The changes there don't seem to account for the possibility that the volume GUID string may not be directly usable. The concatenation of the drive path also seems to be incorrectly including C: at the beginning of the path. If I follow the documentation and create a volume GUID path of \\?\Volume{e7716c21-89be-11eb-bea8-50e085f32ec9}\the\rest\of\the\path then I am able to correctly access the files.
In the usd-interest discussion one proposed solution was to detect this case and not use the volume GUID.
Steps to Reproduce
Mount an external drive on windows:
Connect the external drive (such as a USB stick) to your computer.
Go to Disk Management.
Right click on your connected drive.
Select "Change Drive Letter and Path..."
Select "Add".
Use "Mount in the following empty NTFS folder:"
Locate the folder you want to mount to.
Extract the attached Barrels.zip to that location.
Create a stage from Barrels/Barrels.usd.
In UsdView, this crashes.
In MayaUSD, it reports an error like: // Warning: Unable to find UDIM tiles for C:\??\Volume{009b65f5-0000-0000-0004-000000000000}\RTS\referenced_files\USD\barrelTests\Library\Assets\Barrels\Textures\repacked_BarrelWithLid\repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png //
System Information (OS, Hardware)
Windows 10 version 2004 with KB5001330 (from April 19th, 2021)
Package Versions
USD v21.05
Build Flags
The text was updated successfully, but these errors were encountered:
Description of Issue
Opening a USD file which uses anchored file paths from a mounted volume in windows doesn't work. The resolved volume GUID is not properly formatted and so the system cannot find the files. MayaUSD reports the volume GUID is something like
C:\??\Volume{009b65f5-0000-0000-0004-000000000000}\RTS\referenced_files\USD\barrelTests\Library\Assets\Barrels\Textures\repacked_BarrelWithLid\repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png
.According to the documentation on volume GUIDs the format of the volume GUID is not correct. The string should be something like
\\?\Volume{{009b65f5-0000-0000-0004-000000000000}\the\rest\of\the\path
.Debugging the code, what I see happen is:
../Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png
SdfComputeAssetPathRelativeToLayer
. After this call the resolved path is correct. If I copy that string from the debugger I can get windows to open it. The resolved path is:d:/MAYA-105710/RTS/referenced_files/USD/barrelTests/Library/Assets/Barrels/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_1001_BaseColor.png
. The code still has to replace the 1001 with again, but that part of the code just hasn't execute yet. This path is correct and can be correctly opened.IO_REPARSE_TAG_MOUNT_POINT
and returns the contents of the mount point reparse buffer, which are\\??\\Volume{e7716c21-89be-11eb-bea8-50e085f32ec9}\\
The changes in pull request #1378 add support for handling windows symbolic links. The changes there don't seem to account for the possibility that the volume GUID string may not be directly usable. The concatenation of the drive path also seems to be incorrectly including
C:
at the beginning of the path. If I follow the documentation and create a volume GUID path of\\?\Volume{e7716c21-89be-11eb-bea8-50e085f32ec9}\the\rest\of\the\path
then I am able to correctly access the files.In the usd-interest discussion one proposed solution was to detect this case and not use the volume GUID.
Steps to Reproduce
Mount an external drive on windows:
In UsdView, this crashes.
In MayaUSD, it reports an error like:
// Warning: Unable to find UDIM tiles for C:\??\Volume{009b65f5-0000-0000-0004-000000000000}\RTS\referenced_files\USD\barrelTests\Library\Assets\Barrels\Textures\repacked_BarrelWithLid\repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png //
System Information (OS, Hardware)
Windows 10 version 2004 with KB5001330 (from April 19th, 2021)
Package Versions
USD v21.05
Build Flags
The text was updated successfully, but these errors were encountered: