From 2d9fedf93aa23acdb5b4d8be366de2ec0ed82144 Mon Sep 17 00:00:00 2001 From: debloip Date: Wed, 17 Jul 2024 12:48:37 -0400 Subject: [PATCH] Debugging for OSX --- .../mayaUsd/render/mayaToHydra/cpp/testHydraPrim.cpp | 11 +++++++++++ .../mayaUsd/render/mayaToHydra/testStageVariants.py | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testHydraPrim.cpp b/test/lib/mayaUsd/render/mayaToHydra/cpp/testHydraPrim.cpp index 99ce31aa27..fb8d0986f5 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testHydraPrim.cpp +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testHydraPrim.cpp @@ -15,6 +15,8 @@ #include "testUtils.h" +#include + #include #include @@ -43,3 +45,12 @@ TEST(TestHydraPrim, fromAppPath) ASSERT_FALSE(sceneIndexPath.IsEmpty()); } + +TEST(TestHydraPrim, printSceneIndex) +{ + const auto& sceneIndices = GetTerminalSceneIndices(); + ASSERT_GT(sceneIndices.size(), 0u); + auto siRoot = sceneIndices.front(); + + HdUtils::PrintSceneIndex(std::cout, siRoot); +} diff --git a/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py b/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py index 92bbecc299..d7241302cf 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testStageVariants.py @@ -20,6 +20,8 @@ import mayaUtils import ufe +from testUtils import PluginLoaded + class TestStageVariants(mtohUtils.MayaHydraBaseTestCase): #Subclassing mtohUtils.MayaHydraBaseTestCase to be able to call self.assertSnapshotClose # MayaHydraBaseTestCase.setUpClass requirement. _file = __file__ @@ -56,6 +58,9 @@ def test_UsdStageVariants(self): ufeGlobalSel = ufe.GlobalSelection.get() ufeGlobalSel.clear() ufeGlobalSel.append(cubesItems) + cmds.refresh(force=True) + cmds.loadPlugin('mayaHydraCppTests') + cmds.mayaHydraCppTest(f="TestHydraPrim.printSceneIndex") self.assertSnapshotClose("oneCube.png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT) ufeGlobalSel.clear()