From 584bb35b0180c3201e57004799fbb57ff311dfc9 Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 16 Nov 2023 11:29:49 -0500 Subject: [PATCH] Fix test for UFE lights from MayaUSD --- .../render/mayaToHydra/cpp/testMayaUsdUfeItems.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.cpp b/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.cpp index 33a819d406..9cef3808fe 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.cpp +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testMayaUsdUfeItems.cpp @@ -29,14 +29,9 @@ using namespace MayaHydra; bool IsUfeLight(const HdSceneIndexBasePtr& sceneIndex, const SdfPath& primPath) { - bool isUfeLightPrim = primPath.GetElementString().find("ufeLightProxy") < std::string::npos; - if (!isUfeLightPrim) { - return false; - } - // The shape prim is used to display the light's wireframe and is the only prim we want to allow - // for UFE lights - bool isShapePrim = primPath.GetElementString().find("ufeLightProxyShape") < std::string::npos; - return !isShapePrim; + HdSceneIndexPrim prim = sceneIndex->GetPrim(primPath); + return HdPrimTypeIsLight(prim.primType) + && primPath.GetElementString().find("ufeLightProxy") < std::string::npos; } TEST(MayaUsdUfeItems, skipUsdUfeLights)