Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
roopavr-adsk committed Jul 23, 2024
1 parent 45bb9f3 commit eb7fcd1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 5 additions & 1 deletion lib/flowViewport/sceneIndex/fvpReprSelectorSceneIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ void ReprSelectorSceneIndex::SetReprType(RepSelectorType reprType, bool needsRep
}

const HdDataSourceLocatorSet locators{
HdLegacyDisplayStyleSchema::GetDefaultLocator()
HdLegacyDisplayStyleSchema::GetDefaultLocator(),
HdPrimvarsSchema::GetDefaultLocator()
};
_needsReprChanged = needsReprChanged;

// Dirty notification only if required.

_DirtyAllPrims(locators);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/flowViewport/sceneIndex/fvpReprSelectorSceneIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ReprSelectorSceneIndex : public PXR_NS::HdSingleInputFilteringSceneIndexBa
WireframeRefined, //Refined wireframe (refined means that it supports a "refineLevel" attribute in the displayStyle to get a more refined drawing, valid range is from 0 to 8)
WireframeOnSurface, //Wireframe on surface not refined
WireframeOnSurfaceRefined,//Wireframe on surface refined
None,
Default,
};

FVP_API
Expand Down
9 changes: 3 additions & 6 deletions lib/mayaHydra/mayaPlugin/renderOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ void MtohRenderOverride::_CreateSceneIndicesChainAfterMergingSceneIndex(const MH
_lastFilteringSceneIndexBeforeCustomFiltering = _reprSelectorSceneIndex =
Fvp::ReprSelectorSceneIndex::New(_lastFilteringSceneIndexBeforeCustomFiltering,
_wireframeColorInterfaceImp);
_reprSelectorSceneIndex->SetReprType(Fvp::ReprSelectorSceneIndex::RepSelectorType::None,false);
_reprSelectorSceneIndex->SetReprType(Fvp::ReprSelectorSceneIndex::RepSelectorType::Default, false);

auto wfSi = TfDynamic_cast<Fvp::WireframeSelectionHighlightSceneIndexRefPtr>(Fvp::WireframeSelectionHighlightSceneIndex::New(_lastFilteringSceneIndexBeforeCustomFiltering, _selection, _wireframeColorInterfaceImp));
wfSi->SetDisplayName("Flow Viewport Wireframe Selection Highlight Scene Index");
Expand Down Expand Up @@ -1630,11 +1630,8 @@ void MtohRenderOverride::_RenderOverrideChangedCallback(
// return true if we need to recreate the filtering scene indices chain because of a change, false otherwise.
bool MtohRenderOverride::_NeedToRecreateTheSceneIndicesChain(unsigned int currentDisplayStyle, bool xRayEnabled)
{
if (areDifferentForOneOfTheseBits(currentDisplayStyle, _oldDisplayStyle,
MHWRender::MFrameContext::kGouraudShaded |
MHWRender::MFrameContext::kWireFrame |
MHWRender::MFrameContext::kBoundingBox )
){
if (areDifferentForOneOfTheseBits(currentDisplayStyle, _oldDisplayStyle,
MHWRender::MFrameContext::kBoundingBox)){
return true;
}

Expand Down

0 comments on commit eb7fcd1

Please sign in to comment.