Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly case Ar path string to ArResolvedPath #1261

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/usd/translators/shading/usdUVTextureReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ bool PxrMayaUsdUVTexture_Reader::Read(UsdMayaPrimReaderContext* context)
&& !filePath.empty() && ArIsPackageRelativePath(filePath)) {
// NOTE: (yliangsiew) Package-relatve path means that we are inside of a USDZ file.
ArResolver& arResolver = ArGetResolver(); // NOTE: (yliangsiew) This is cached.
#if PXR_VERSION > 2011
std::shared_ptr<ArAsset> assetPtr = arResolver.OpenAsset(ArResolvedPath(filePath));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dj-mcg Please check PF results - https://github.com/Autodesk/maya-usd/pull/1261/checks?check_run_id=2125284262. Looks like this wasn't existing in USD 20.11. We currently support USD versions down to 20.02.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kxl-adsk - put in a PXR_VERSION check and running preflight now

#else
std::shared_ptr<ArAsset> assetPtr = arResolver.OpenAsset(filePath);
#endif

if (assetPtr == nullptr) {
TF_WARN(
"The file: %s could not be found within the USDZ archive for extraction.",
Expand Down