| 449 | } |
| 450 | |
| 451 | std::string ResolveAssetPath(const pxr::VtValue& Value) |
| 452 | { |
| 453 | // Note that the SdfAssetPath should really be resolved into an ArAsset via |
| 454 | // ArGetResolver (Eg. USDZ). Using GetResolvePath directly isn't sufficient. |
| 455 | // Texture loading goes via Glf, which will handle the ArAsset |
| 456 | // resolution already, so we skip doing it here and simply use the string. |
| 457 | if (Value.IsHolding<pxr::SdfAssetPath>()) |
| 458 | { |
| 459 | pxr::SdfAssetPath SdfPath = Value.Get<pxr::SdfAssetPath>(); |
| 460 | std::string PathStr = SdfPath.GetResolvedPath(); |
| 461 | if (PathStr.empty()) |
| 462 | { |
| 463 | PathStr = SdfPath.GetAssetPath(); |
| 464 | } |
| 465 | return PathStr; |
| 466 | } |
| 467 | else if (Value.IsHolding<std::string>()) |
| 468 | { |
| 469 | return Value.UncheckedGet<std::string>(); |
| 470 | } |
| 471 | |
| 472 | return std::string{}; |
| 473 | } |
| 474 | |
| 475 | pxr::HdWrap ResolveWrapSamplerParameter(const pxr::SdfPath& NodePath, |
| 476 | const pxr::HdMaterialNode2& Node, |