Skip to content

Commit

Permalink
Merge pull request #152 from LumaPictures/pr/select_render_guides
Browse files Browse the repository at this point in the history
if renderGuides are shown, they should be selectable
  • Loading branch information
murphyeoin authored Aug 29, 2019
2 parents ffca007 + 9d681e9 commit 44ce80e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/AL_USDMaya/AL/usdmaya/nodes/ProxyDrawOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,16 @@ bool ProxyDrawOverride::userSelect(
MMatrix invMatrix = objPath.inclusiveMatrixInverse();
GfMatrix4d worldToLocalSpace(invMatrix.matrix);

UsdImagingGLRenderParams params;

auto* proxyShape = static_cast<ProxyShape*>(getShape(objPath));
auto engine = proxyShape->engine();
if (!engine) return false;
proxyShape->m_pleaseIgnoreSelection = true;

UsdImagingGLRenderParams params;
// Mostly want to get render params to set renderGuides/proxyGuides/etc
proxyShape->getRenderAttris(params, context, objPath);

UsdPrim root = proxyShape->getUsdStage()->GetPseudoRoot();

Engine::HitBatch hitBatch;
Expand Down
5 changes: 4 additions & 1 deletion lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShapeUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ bool ProxyShapeUI::select(MSelectInfo& selectInfo, MSelectionList& selectionList
MDagPath selectPath = selectInfo.selectPath();
MMatrix invMatrix = selectPath.inclusiveMatrixInverse();

UsdImagingGLRenderParams params;
MMatrix viewMatrix, projectionMatrix;
GfMatrix4d worldToLocalSpace(invMatrix.matrix);

Expand All @@ -334,6 +333,10 @@ bool ProxyShapeUI::select(MSelectInfo& selectInfo, MSelectionList& selectionList
if (!engine) return false;
proxyShape->m_pleaseIgnoreSelection = true;

UsdImagingGLRenderParams params;
params.showGuides = proxyShape->displayGuidesPlug().asBool();
params.showRender = proxyShape->displayRenderGuidesPlug().asBool();

UsdPrim root = proxyShape->getUsdStage()->GetPseudoRoot();

Engine::HitBatch hitBatch;
Expand Down

0 comments on commit 44ce80e

Please sign in to comment.