diff options
author | Michael Kowalski <makowalski@nvidia.com> | 2022-11-01 17:32:36 +0300 |
---|---|---|
committer | Michael Kowalski <makowalski@nvidia.com> | 2022-11-01 17:32:36 +0300 |
commit | e6823f32e9a7372ca06a5989d56d855df31afea8 (patch) | |
tree | 26c011cc9fe96ee8e1ae023b474586afebf613bf | |
parent | 108b3ee33e6eae9d0bcbd6fd7693694b871f51c1 (diff) |
USD tests: replace deprecated imaging code.
UsdImagingCapsuleAdapter static functions GetMeshPoints() and
GetTopology() have been removed in USD 22.11. In anticipation
of this upcoming change, I've updated the test code to call
the corresponding virtual functions instead.
-rw-r--r-- | source/blender/io/usd/tests/usd_imaging_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/io/usd/tests/usd_imaging_test.cc b/source/blender/io/usd/tests/usd_imaging_test.cc index 5cd3c042e59..80c232ad099 100644 --- a/source/blender/io/usd/tests/usd_imaging_test.cc +++ b/source/blender/io/usd/tests/usd_imaging_test.cc @@ -42,8 +42,8 @@ TEST_F(USDImagingTest, CapsuleAdapterTest) } pxr::UsdImagingCapsuleAdapter capsule_adapter; - pxr::VtValue points_value = pxr::UsdImagingCapsuleAdapter::GetMeshPoints( - capsule.GetPrim(), pxr::UsdTimeCode::Default()); + pxr::VtValue points_value = capsule_adapter.GetPoints(capsule.GetPrim(), + pxr::UsdTimeCode::Default()); if (!points_value.IsHolding<pxr::VtArray<pxr::GfVec3f>>()) { FAIL() << "Mesh points value holding unexpected type."; return; @@ -52,7 +52,8 @@ TEST_F(USDImagingTest, CapsuleAdapterTest) pxr::VtArray<pxr::GfVec3f> points = points_value.Get<pxr::VtArray<pxr::GfVec3f>>(); EXPECT_FALSE(points.empty()); - pxr::VtValue topology_value = pxr::UsdImagingCapsuleAdapter::GetMeshTopology(); + pxr::VtValue topology_value = capsule_adapter.GetTopology( + capsule.GetPrim(), pxr::SdfPath(), pxr::UsdTimeCode::Default()); if (!topology_value.IsHolding<pxr::HdMeshTopology>()) { FAIL() << "Mesh topology value holding unexpected type."; |