Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAYA-120891 _UpdateSelectionStates may trigger an execute. The wireframe color #1957

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/mayaUsd/render/vp2RenderDelegate/proxyRenderDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,15 @@ void ProxyRenderDelegate::_Execute(const MHWRender::MFrameContext& frameContext)
#endif
#endif // defined(MAYA_ENABLE_UPDATE_FOR_SELECTION)

const unsigned int displayStyle = frameContext.getDisplayStyle();

// Query the wireframe color assigned to proxy shape.
if (displayStyle
& (MHWRender::MFrameContext::kBoundingBox | MHWRender::MFrameContext::kWireFrame)) {
_wireframeColor
= MHWRender::MGeometryUtilities::wireframeColor(_proxyShapeData->ProxyDagPath());
}

// Work around for USD issue #1516. We don't know if any instanced object has
// had it's instance index change, so re-populate selection every update to
// ensure correct selection highlighting of instanced objects.
Expand All @@ -791,15 +800,6 @@ void ProxyRenderDelegate::_Execute(const MHWRender::MFrameContext& frameContext)
}
#endif
} else {
const unsigned int displayStyle = frameContext.getDisplayStyle();

// Query the wireframe color assigned to proxy shape.
if (displayStyle
& (MHWRender::MFrameContext::kBoundingBox | MHWRender::MFrameContext::kWireFrame)) {
_wireframeColor
= MHWRender::MGeometryUtilities::wireframeColor(_proxyShapeData->ProxyDagPath());
}

// Update repr selector based on display style of the current viewport
if (displayStyle & MHWRender::MFrameContext::kBoundingBox) {
if (!reprSelector.Contains(HdVP2ReprTokens->bbox)) {
Expand Down