Skip to content

Commit

Permalink
HYDRA-1058 : Skip GeomSubset picking tests if USD version does not su…
Browse files Browse the repository at this point in the history
…pport GeomSubset prims
  • Loading branch information
debloip-adsk committed Jul 4, 2024
1 parent d7ff4e3 commit 84545f2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/lib/mayaUsd/render/mayaToHydra/cpp/testGeomSubsetsPicking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,43 +152,62 @@ void testInstancePicking(const Ufe::Path& clickInstancerUfePath, int clickInstan

TEST(TestGeomSubsetsPicking, geomSubsetPicking)
{
#if PXR_VERSION < 2403
GTEST_SKIP() << "Skipping test, USD version used does not support GeomSubset prims.";
#else
const auto cubeMeshUfePathString = kStageUfePathSegment + "," + kCubeMeshUfePathSegment;
const auto cubeMeshUfePath = Ufe::PathString::path(cubeMeshUfePathString);
const auto cubeUpperHalfUfePath = Ufe::PathString::path(cubeMeshUfePathString + "/" + kCubeUpperHalfName);
testPrimPicking(cubeMeshUfePath, QPoint(0, -25), cubeUpperHalfUfePath);
#endif
}

TEST(TestGeomSubsetsPicking, fallbackPicking)
{
#if PXR_VERSION < 2403
GTEST_SKIP() << "Skipping test, USD version used does not support GeomSubset prims.";
#else
const auto cubeMeshUfePathString = kStageUfePathSegment + "," + kCubeMeshUfePathSegment;
const auto cubeMeshUfePath = Ufe::PathString::path(cubeMeshUfePathString);
testPrimPicking(cubeMeshUfePath, QPoint(0, 25), cubeMeshUfePath);
#endif
}

TEST(TestGeomSubsetsPicking, instanceGeomSubsetPicking)
{
#if PXR_VERSION < 2403
GTEST_SKIP() << "Skipping test, USD version used does not support GeomSubset prims.";
#else
const auto sphereInstancerUfePathString = kStageUfePathSegment + "," + kSphereInstancerUfePathSegment;
const auto sphereInstancerUfePath = Ufe::PathString::path(sphereInstancerUfePathString);

const auto sphereMeshUfePathString = kStageUfePathSegment + "," + kSphereMeshUfePathSegment;
const auto sphereUpperHalfUfePath = Ufe::PathString::path(sphereMeshUfePathString + "/" + kSphereUpperHalfName);

testInstancePicking(sphereInstancerUfePath, 0, QPoint(0, -25), sphereUpperHalfUfePath);
#endif
}

TEST(TestGeomSubsetsPicking, instanceFallbackPicking)
{
#if PXR_VERSION < 2403
GTEST_SKIP() << "Skipping test, USD version used does not support GeomSubset prims.";
#else
const auto sphereInstancerUfePathString = kStageUfePathSegment + "," + kSphereInstancerUfePathSegment;
const auto sphereInstancerUfePath = Ufe::PathString::path(sphereInstancerUfePathString);

const auto sphereMeshUfePathString = kStageUfePathSegment + "," + kSphereMeshUfePathSegment;
const auto sphereMeshUfePath = Ufe::PathString::path(sphereMeshUfePathString);

testInstancePicking(sphereInstancerUfePath, 0, QPoint(0, 25), sphereMeshUfePath);
#endif
}

TEST(TestGeomSubsetsPicking, marqueeSelect)
{
#if PXR_VERSION < 2403
GTEST_SKIP() << "Skipping test, USD version used does not support GeomSubset prims.";
#else
const SceneIndicesVector& sceneIndices = GetTerminalSceneIndices();
ASSERT_GT(sceneIndices.size(), 0u);
SceneIndexInspector inspector(sceneIndices.front());
Expand Down Expand Up @@ -229,4 +248,5 @@ TEST(TestGeomSubsetsPicking, marqueeSelect)
for (const auto& geomSubsetName : geomSubsetNamesToSelect) {
assertSelected(inspector, PrimNamePredicate(geomSubsetName));
}
#endif
}

0 comments on commit 84545f2

Please sign in to comment.