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.
This commit is contained in:
parent
108b3ee33e
commit
e6823f32e9
|
@ -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.";
|
||||
|
|
Loading…
Reference in New Issue