Skip to content

Commit

Permalink
Merge pull request #1261 from dj-mcg/pr/Explicitly_cast_Ar_path_strin…
Browse files Browse the repository at this point in the history
…g_to_ArResolvedPath

Explicitly case Ar path string to ArResolvedPath
  • Loading branch information
Krystian Ligenza authored Mar 18, 2021
2 parents f6a6a54 + 294110c commit 0e00e1d
Showing 1 changed file with 5 additions and 0 deletions.
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));
#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

0 comments on commit 0e00e1d

Please sign in to comment.