diff --git a/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp b/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp index 03aee0b975..85c17a2a4d 100644 --- a/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp +++ b/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp @@ -353,15 +353,13 @@ void MayaHydraSceneIndexRegistry::_AddSceneIndexForNode(MObject& dagNode) registration->interpretRprimPathFn = &(MAYAHYDRA_NS_DEF::MayaUsdProxyShapeSceneIndex::InterpretRprimPath); mayaUsdProxyShapeSceneIndex->Populate(); - registration->rootSceneIndex = registration->pluginSceneIndex; - - registration->rootSceneIndex = HdPrefixingSceneIndex::New( - registration->rootSceneIndex, + auto pfsi = HdPrefixingSceneIndex::New( + registration->pluginSceneIndex, registration->sceneIndexPathPrefix); //Add the PathInterfaceSceneIndex which must be the last scene index, it is used for selection highlighting registration->rootSceneIndex = PathInterfaceSceneIndex::New( - registration->rootSceneIndex, + pfsi, registration->sceneIndexPathPrefix, Ufe::Path(UfeExtensions::dagPathToUfePathSegment(dagPath))); diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.cpp b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.cpp index b31e28004a..cfefc90600 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.cpp +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.cpp @@ -1,4 +1,4 @@ -// Copyright 2023 Autodesk +// Copyright 2024 Autodesk // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -78,10 +78,10 @@ TEST(TestPathInterface, testUnselected) // Get the Flow Viewport selection scene index. auto snSi = getSelectionSceneIndex(); - // Selected object path string is in command line arguments. + // Unselected object path string is in command line arguments. // Get it and translate it into a scene index path. const auto sceneIndexPath = getArgSceneIndexPath(snSi); - // Confirm the object is selected in scene index scene. + // Confirm the object is not selected in scene index scene. ASSERT_FALSE(snSi->IsFullySelected(sceneIndexPath)); } diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py index f522b6c30c..07b9ec053c 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py @@ -1,4 +1,4 @@ -# Copyright 2023 Autodesk +# Copyright 2024 Autodesk # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,9 +25,7 @@ import unittest -import sys - -class TestUsdStageLayerMuting(mtohUtils.MayaHydraBaseTestCase): +class TestPathInterface(mtohUtils.MayaHydraBaseTestCase): # MayaHydraBaseTestCase.setUpClass requirement. _file = __file__