LucaScheller / VFX-UsdAssetResolver

Usd Asset Resolver Reference Implementations
https://lucascheller.github.io/VFX-UsdAssetResolver/
Apache License 2.0
108 stars 22 forks source link

windows absolute path drive letter lower case #16

Open Xelt opened 2 months ago

Xelt commented 2 months ago

With the Cached Resolver set with SetExposeRelativePathIdentifierState(True), the drive letter on windows is returned as lower case trough assetPath argument of ResolveAndCache method...

In Houdini U:/path/to/file

@staticmethod
def ResolveAndCache(context, assetPath):
    print(assetPath)

assetPath = u:/path/to/file

LucaScheller commented 2 months ago

Thanks for flagging this!

I'll have to check the code if we are on purpose lowercasing it (as far as I remember, no). Since Windows is case-insensitive, this shouldn't matter for resolving itself (but it probably affects how the pinning file needs to be stored).

vanridal commented 1 month ago

This is caused by TfNormPath, in the CreateIdentifier() call, only on windows compiled usd does it do this. Normaliaze any windows style paths that get added to the mappingPairs or cachedPairs to be sure of matching