Skip to content

Commit

Permalink
Addressed code review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ppt-adsk committed Feb 21, 2024
1 parent 83fbcb8 commit ba3935c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
8 changes: 3 additions & 5 deletions lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));

Expand Down
6 changes: 3 additions & 3 deletions test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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));
}
6 changes: 2 additions & 4 deletions test/lib/mayaUsd/render/mayaToHydra/cpp/testPathInterface.py
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -25,9 +25,7 @@

import unittest

import sys

class TestUsdStageLayerMuting(mtohUtils.MayaHydraBaseTestCase):
class TestPathInterface(mtohUtils.MayaHydraBaseTestCase):
# MayaHydraBaseTestCase.setUpClass requirement.
_file = __file__

Expand Down

0 comments on commit ba3935c

Please sign in to comment.