Skip to content

Commit

Permalink
Fix for viewport switching crash] (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
roopavr-adsk authored Aug 12, 2024
1 parent 1a356a2 commit 6961055
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/mayaHydra/mayaPlugin/renderOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1140,17 +1140,17 @@ void MtohRenderOverride::_CreateSceneIndicesChainAfterMergingSceneIndex(const MH
_leadObjectPathTracker = std::make_shared<MAYAHYDRA_NS_DEF::MhLeadObjectPathTracker>(mergingSceneIndex, _dirtyLeadObjectSceneIndex);
}

if (! _wireframeColorInterfaceImp){
_wireframeColorInterfaceImp = std::make_shared<MAYAHYDRA_NS_DEF::MhWireframeColorInterfaceImp>(_selection, _leadObjectPathTracker);
}

//Are we using Bounding Box display style ?
if (currentDisplayStyle & MHWRender::MFrameContext::kBoundingBox){
//Insert the bounding box filtering scene index which converts geometries into a bounding box using the extent attribute
auto bboxSceneIndex = Fvp::BboxSceneIndex::New(_lastFilteringSceneIndexBeforeCustomFiltering, _wireframeColorInterfaceImp);
bboxSceneIndex->addExcludedSceneRoot(MAYA_NATIVE_ROOT); // Maya native prims are already converted by OGS
_lastFilteringSceneIndexBeforeCustomFiltering = bboxSceneIndex;
}

if (! _wireframeColorInterfaceImp){
_wireframeColorInterfaceImp = std::make_shared<MAYAHYDRA_NS_DEF::MhWireframeColorInterfaceImp>(_selection, _leadObjectPathTracker);
}

// Repr selector Scene Index
_lastFilteringSceneIndexBeforeCustomFiltering = _reprSelectorSceneIndex =
Expand Down

0 comments on commit 6961055

Please sign in to comment.