From e123772be9dda73f49ac646deaa5725015a36d27 Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 10 Oct 2024 15:41:34 -0400 Subject: [PATCH 01/37] HYDRA-1098 : Add new pruning scene index --- lib/flowViewport/sceneIndex/CMakeLists.txt | 2 + .../sceneIndex/fvpPruningSceneIndex.cpp | 76 +++++++++++++++++++ .../sceneIndex/fvpPruningSceneIndex.h | 73 ++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp create mode 100644 lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h diff --git a/lib/flowViewport/sceneIndex/CMakeLists.txt b/lib/flowViewport/sceneIndex/CMakeLists.txt index 56d3c1458..364e0463d 100644 --- a/lib/flowViewport/sceneIndex/CMakeLists.txt +++ b/lib/flowViewport/sceneIndex/CMakeLists.txt @@ -13,6 +13,7 @@ target_sources(${TARGET_NAME} fvpWireframeSelectionHighlightSceneIndex.cpp fvpDisplayStyleOverrideSceneIndex.cpp fvpPruneTexturesSceneIndex.cpp + fvpPruningSceneIndex.cpp fvpBBoxSceneIndex.cpp fvpReprSelectorSceneIndex.cpp fvpBlockPrimRemovalPropagationSceneIndex.cpp @@ -32,6 +33,7 @@ set(HEADERS fvpWireframeSelectionHighlightSceneIndex.h fvpDisplayStyleOverrideSceneIndex.h fvpPruneTexturesSceneIndex.h + fvpPruningSceneIndex.h fvpBBoxSceneIndex.h fvpReprSelectorSceneIndex.h fvpBlockPrimRemovalPropagationSceneIndex.h diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp new file mode 100644 index 000000000..fa6a216db --- /dev/null +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -0,0 +1,76 @@ +// 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. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "flowViewport/sceneIndex/fvpPruningSceneIndex.h" + +#include +#include +#include +#include +#include + +#include + +PXR_NAMESPACE_USING_DIRECTIVE + +namespace { + +} // namespace + +namespace FVP_NS_DEF { + +PruningSceneIndexRefPtr PruningSceneIndex::New(const HdSceneIndexBaseRefPtr &inputSceneIndex) +{ + return TfCreateRefPtr(new PruningSceneIndex(inputSceneIndex)); +} + +PruningSceneIndex::PruningSceneIndex(HdSceneIndexBaseRefPtr const &inputSceneIndex) : + HdSingleInputFilteringSceneIndexBase(inputSceneIndex), + InputSceneIndexUtils(inputSceneIndex) +{ +} + +HdSceneIndexPrim PruningSceneIndex::GetPrim(const SdfPath& primPath) const +{ + return GetInputSceneIndex()->GetPrim(primPath); +} + +SdfPathVector PruningSceneIndex::GetChildPrimPaths(const SdfPath& primPath) const +{ + return GetInputSceneIndex()->GetChildPrimPaths(primPath); +} + +void PruningSceneIndex::_PrimsAdded( + const PXR_NS::HdSceneIndexBase &sender, + const PXR_NS::HdSceneIndexObserver::AddedPrimEntries &entries) +{ + +} + +void PruningSceneIndex::_PrimsRemoved( + const PXR_NS::HdSceneIndexBase &sender, + const PXR_NS::HdSceneIndexObserver::RemovedPrimEntries &entries) +{ + +} + +void PruningSceneIndex::_PrimsDirtied( + const PXR_NS::HdSceneIndexBase &sender, + const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) +{ + +} + +} // namespace FVP_NS_DEF diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h new file mode 100644 index 000000000..577ac0e0a --- /dev/null +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -0,0 +1,73 @@ +// 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. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#ifndef FVP_PRUNING_SCENE_INDEX_H +#define FVP_PRUNING_SCENE_INDEX_H + +#include "flowViewport/api.h" +#include "flowViewport/sceneIndex/fvpSceneIndexUtils.h" + +#include +#include +#include +#include + +namespace FVP_NS_DEF { + +class PruningSceneIndex; +typedef PXR_NS::TfRefPtr PruningSceneIndexRefPtr; +typedef PXR_NS::TfRefPtr PruningSceneIndexConstRefPtr; + +class PruningSceneIndex : + public PXR_NS::HdSingleInputFilteringSceneIndexBase + , public Fvp::InputSceneIndexUtils +{ +public: + using PXR_NS::HdSingleInputFilteringSceneIndexBase::_GetInputSceneIndex; + + FVP_API + static PruningSceneIndexRefPtr New(const PXR_NS::HdSceneIndexBaseRefPtr &inputScene); + + FVP_API + ~PruningSceneIndex() override = default; + + FVP_API + PXR_NS::HdSceneIndexPrim GetPrim(const PXR_NS::SdfPath& primPath) const override; + + FVP_API + PXR_NS::SdfPathVector GetChildPrimPaths(const PXR_NS::SdfPath& primPath) const override; + +protected: + FVP_API + PruningSceneIndex(PXR_NS::HdSceneIndexBaseRefPtr const &inputSceneIndex); + + FVP_API + void _PrimsAdded( + const PXR_NS::HdSceneIndexBase &sender, + const PXR_NS::HdSceneIndexObserver::AddedPrimEntries &entries) override; + + FVP_API + void _PrimsRemoved( + const PXR_NS::HdSceneIndexBase &sender, + const PXR_NS::HdSceneIndexObserver::RemovedPrimEntries &entries) override; + + FVP_API + void _PrimsDirtied( + const PXR_NS::HdSceneIndexBase &sender, + const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) override; +}; + +} // namespace FVP_NS_DEF + +#endif // FVP_PRUNING_SCENE_INDEX_H From 3f36ca7175343a0b3696becef9dc2b6c616335f3 Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 10 Oct 2024 16:18:02 -0400 Subject: [PATCH 02/37] HYDRA-1098 : Implement enable/disable filter --- .../sceneIndex/fvpPruningSceneIndex.cpp | 58 ++++++++++++++++++- .../sceneIndex/fvpPruningSceneIndex.h | 12 ++++ 2 files changed, 67 insertions(+), 3 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index fa6a216db..b228a3641 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -14,9 +14,13 @@ // #include "flowViewport/sceneIndex/fvpPruningSceneIndex.h" +#include "fvpPruningSceneIndex.h" #include +#include #include +#include +#include #include #include #include @@ -27,6 +31,11 @@ PXR_NAMESPACE_USING_DIRECTIVE namespace { +bool _PrunePrim(const HdSceneIndexPrim& prim, const TfToken& filterToken) +{ + return true; +} + } // namespace namespace FVP_NS_DEF { @@ -52,25 +61,68 @@ SdfPathVector PruningSceneIndex::GetChildPrimPaths(const SdfPath& primPath) cons return GetInputSceneIndex()->GetChildPrimPaths(primPath); } +bool PruningSceneIndex::EnableFilter(const TfToken& filterToken) +{ + if (_prunedPathsByFilter.find(filterToken) != _prunedPathsByFilter.end()) { + // Filter already enabled, no change needed. + return false; + } + + HdSceneIndexObserver::RemovedPrimEntries prunedPrims; + + for (const SdfPath& primPath: HdSceneIndexPrimView(GetInputSceneIndex())) { + if (_PrunePrim(GetInputSceneIndex()->GetPrim(primPath), filterToken)) { + _prunedPathsByFilter[filterToken].emplace(primPath); + prunedPrims.emplace_back(primPath); + } + } + + if (!prunedPrims.empty()) { + _SendPrimsRemoved(prunedPrims); + } + + return true; +} + +bool PruningSceneIndex::DisableFilter(const TfToken& filterToken) +{ + if (_prunedPathsByFilter.find(filterToken) == _prunedPathsByFilter.end()) { + // Filter already disabled, no change needed. + return false; + } + + HdSceneIndexObserver::AddedPrimEntries unprunedPrims; + + for (const auto& primPath : _prunedPathsByFilter[filterToken]) { + unprunedPrims.emplace_back(primPath, GetInputSceneIndex()->GetPrim(primPath).primType); + } + + if (!unprunedPrims.empty()) { + _SendPrimsAdded(unprunedPrims); + } + + return true; +} + void PruningSceneIndex::_PrimsAdded( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::AddedPrimEntries &entries) { - +// Catch prims to prune } void PruningSceneIndex::_PrimsRemoved( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::RemovedPrimEntries &entries) { - +// Remove from map if it was pruned } void PruningSceneIndex::_PrimsDirtied( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) { - +// Check if prim pruning status should change } } // namespace FVP_NS_DEF diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 577ac0e0a..67994878d 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -18,10 +18,13 @@ #include "flowViewport/api.h" #include "flowViewport/sceneIndex/fvpSceneIndexUtils.h" +#include #include #include #include #include +#include +#include namespace FVP_NS_DEF { @@ -48,6 +51,12 @@ class PruningSceneIndex : FVP_API PXR_NS::SdfPathVector GetChildPrimPaths(const PXR_NS::SdfPath& primPath) const override; + FVP_API + bool EnableFilter(const PXR_NS::TfToken& filterToken); + + FVP_API + bool DisableFilter(const PXR_NS::TfToken& filterToken); + protected: FVP_API PruningSceneIndex(PXR_NS::HdSceneIndexBaseRefPtr const &inputSceneIndex); @@ -66,6 +75,9 @@ class PruningSceneIndex : void _PrimsDirtied( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) override; + + // Maps a filtering token to the set of prim paths that have been pruned out by this token + std::map _prunedPathsByFilter; }; } // namespace FVP_NS_DEF From dc636e547dbcb0d6059c9b99c5b74a2b8da870a7 Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 10 Oct 2024 16:21:12 -0400 Subject: [PATCH 03/37] HYDRA-1098 : Add pruning tokens --- .../sceneIndex/fvpPruningSceneIndex.cpp | 22 ++++++++++++------- .../sceneIndex/fvpPruningSceneIndex.h | 14 ++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index b228a3641..9668c80b9 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -27,11 +27,17 @@ #include +PXR_NAMESPACE_OPEN_SCOPE + +TF_DEFINE_PUBLIC_TOKENS(FvpPruningTokens, FVP_PRUNING_TOKENS); + +PXR_NAMESPACE_CLOSE_SCOPE + PXR_NAMESPACE_USING_DIRECTIVE namespace { -bool _PrunePrim(const HdSceneIndexPrim& prim, const TfToken& filterToken) +bool _PrunePrim(const HdSceneIndexPrim& prim, const TfToken& pruningToken) { return true; } @@ -61,9 +67,9 @@ SdfPathVector PruningSceneIndex::GetChildPrimPaths(const SdfPath& primPath) cons return GetInputSceneIndex()->GetChildPrimPaths(primPath); } -bool PruningSceneIndex::EnableFilter(const TfToken& filterToken) +bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) { - if (_prunedPathsByFilter.find(filterToken) != _prunedPathsByFilter.end()) { + if (_prunedPathsByFilter.find(pruningToken) != _prunedPathsByFilter.end()) { // Filter already enabled, no change needed. return false; } @@ -71,8 +77,8 @@ bool PruningSceneIndex::EnableFilter(const TfToken& filterToken) HdSceneIndexObserver::RemovedPrimEntries prunedPrims; for (const SdfPath& primPath: HdSceneIndexPrimView(GetInputSceneIndex())) { - if (_PrunePrim(GetInputSceneIndex()->GetPrim(primPath), filterToken)) { - _prunedPathsByFilter[filterToken].emplace(primPath); + if (_PrunePrim(GetInputSceneIndex()->GetPrim(primPath), pruningToken)) { + _prunedPathsByFilter[pruningToken].emplace(primPath); prunedPrims.emplace_back(primPath); } } @@ -84,16 +90,16 @@ bool PruningSceneIndex::EnableFilter(const TfToken& filterToken) return true; } -bool PruningSceneIndex::DisableFilter(const TfToken& filterToken) +bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) { - if (_prunedPathsByFilter.find(filterToken) == _prunedPathsByFilter.end()) { + if (_prunedPathsByFilter.find(pruningToken) == _prunedPathsByFilter.end()) { // Filter already disabled, no change needed. return false; } HdSceneIndexObserver::AddedPrimEntries unprunedPrims; - for (const auto& primPath : _prunedPathsByFilter[filterToken]) { + for (const auto& primPath : _prunedPathsByFilter[pruningToken]) { unprunedPrims.emplace_back(primPath, GetInputSceneIndex()->GetPrim(primPath).primType); } diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 67994878d..134596cca 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -26,6 +26,20 @@ #include #include +PXR_NAMESPACE_OPEN_SCOPE + +// clang-format off +#define FVP_PRUNING_TOKENS \ + (mesh) \ + (sphere) \ + (cone) \ + (cube) +// clang-format on + +TF_DECLARE_PUBLIC_TOKENS(FvpPruningTokens, FVP_API, FVP_PRUNING_TOKENS); + +PXR_NAMESPACE_CLOSE_SCOPE + namespace FVP_NS_DEF { class PruningSceneIndex; From 325880944960e287929cefb528ab14e42feb3548 Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 10 Oct 2024 16:47:07 -0400 Subject: [PATCH 04/37] HYDRA-1098 : Implement notifications handlers --- .../sceneIndex/fvpPruningSceneIndex.cpp | 65 +++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 9668c80b9..328edde60 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -39,7 +40,10 @@ namespace { bool _PrunePrim(const HdSceneIndexPrim& prim, const TfToken& pruningToken) { - return true; + if (pruningToken == FvpPruningTokens->mesh) { + return prim.primType == HdPrimTypeTokens->mesh; + } + return false; } } // namespace @@ -114,21 +118,74 @@ void PruningSceneIndex::_PrimsAdded( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::AddedPrimEntries &entries) { -// Catch prims to prune + HdSceneIndexObserver::AddedPrimEntries editedEntries; + for (const auto& addedEntry : entries) { + for (auto& filterEntry : _prunedPathsByFilter) { + if (_PrunePrim(GetInputSceneIndex()->GetPrim(addedEntry.primPath), filterEntry.first)) { + filterEntry.second.emplace(addedEntry.primPath); + } else { + editedEntries.emplace_back(addedEntry); + } + } + } + if (!editedEntries.empty()) { + _SendPrimsAdded(editedEntries); + } } void PruningSceneIndex::_PrimsRemoved( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::RemovedPrimEntries &entries) { -// Remove from map if it was pruned + HdSceneIndexObserver::RemovedPrimEntries editedEntries; + for (const auto& removedEntry : entries) { + for (auto& filterEntry : _prunedPathsByFilter) { + if (filterEntry.second.find(removedEntry.primPath) != filterEntry.second.end()) { + filterEntry.second.erase(removedEntry.primPath); + } else { + editedEntries.emplace_back(removedEntry); + } + } + } + if (!editedEntries.empty()) { + _SendPrimsRemoved(editedEntries); + } } void PruningSceneIndex::_PrimsDirtied( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) { -// Check if prim pruning status should change + HdSceneIndexObserver::DirtiedPrimEntries editedEntries; + HdSceneIndexObserver::RemovedPrimEntries removedEntries; + HdSceneIndexObserver::AddedPrimEntries addedEntries; + + for (const auto& dirtiedEntry : entries) { + for (const auto& filterEntry : _prunedPathsByFilter) { + HdSceneIndexPrim dirtiedPrim = GetInputSceneIndex()->GetPrim(dirtiedEntry.primPath); + + bool isPruned = filterEntry.second.find(dirtiedEntry.primPath) != filterEntry.second.end(); + bool shouldBePruned = _PrunePrim(dirtiedPrim, filterEntry.first); + + if (!isPruned && shouldBePruned) { + removedEntries.emplace_back(dirtiedEntry.primPath); + } else if (isPruned && !shouldBePruned) { + addedEntries.emplace_back(dirtiedEntry.primPath, dirtiedPrim.primType); + } else { + editedEntries.emplace_back(dirtiedEntry); + } + } + } + + if (!removedEntries.empty()) { + _SendPrimsRemoved(removedEntries); + } + if (!addedEntries.empty()) { + _SendPrimsAdded(addedEntries); + } + if (!editedEntries.empty()) { + _SendPrimsDirtied(editedEntries); + } } } // namespace FVP_NS_DEF From 8fd711d5306e50f054ee855aa12dff70ce507fb3 Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 10 Oct 2024 17:14:36 -0400 Subject: [PATCH 05/37] HYDRA-1098 : Workaround for PathInterface + basic integration --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h | 13 ++++++++++++- lib/mayaHydra/mayaPlugin/renderOverride.cpp | 11 ++++++++++- lib/mayaHydra/mayaPlugin/renderOverride.h | 2 ++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 134596cca..2d0cc6549 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -17,7 +17,9 @@ #include "flowViewport/api.h" #include "flowViewport/sceneIndex/fvpSceneIndexUtils.h" +#include "flowViewport/sceneIndex/fvpPathInterface.h" +#include #include #include #include @@ -48,7 +50,8 @@ typedef PXR_NS::TfRefPtr PruningSceneIndexConstRefPtr; class PruningSceneIndex : public PXR_NS::HdSingleInputFilteringSceneIndexBase - , public Fvp::InputSceneIndexUtils + , public InputSceneIndexUtils + , public PathInterface // As a workaround until we move to exclusively using PathMappers { public: using PXR_NS::HdSingleInputFilteringSceneIndexBase::_GetInputSceneIndex; @@ -71,6 +74,14 @@ class PruningSceneIndex : FVP_API bool DisableFilter(const PXR_NS::TfToken& filterToken); + FVP_API + PrimSelections UfePathToPrimSelections(const Ufe::Path& appPath) const override { + PXR_NAMESPACE_USING_DIRECTIVE; + const PathInterface* pathInterface = dynamic_cast(&*GetInputSceneIndex()); + TF_AXIOM(pathInterface); + return pathInterface->UfePathToPrimSelections(appPath); + } + protected: FVP_API PruningSceneIndex(PXR_NS::HdSceneIndexBaseRefPtr const &inputSceneIndex); diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index f04ba1b09..62f72dc7b 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -102,6 +102,7 @@ #include #include #include +#include #include #include #include @@ -802,6 +803,13 @@ MStatus MtohRenderOverride::Render( _displayStyleSceneIndex->SetRefineLevel({true, delegateParams.refineLevel}); } + auto objectExclusions = framecontext->objectTypeExclusions(); + if (objectExclusions & MHWRender::MFrameContext::kExcludeMeshes) { + _pruningSceneIndex->EnableFilter(FvpPruningTokens->mesh); + } else { + _pruningSceneIndex->DisableFilter(FvpPruningTokens->mesh); + } + // Toggle textures in the material network const unsigned int currentDisplayMode = drawContext.getDisplayStyle(); bool isTextured = currentDisplayMode & MHWRender::MFrameContext::kTextured; @@ -1088,8 +1096,9 @@ void MtohRenderOverride::_InitHydraResources(const MHWRender::MDrawContext& draw //Put BlockPrimRemovalPropagationSceneIndex first as it can block/unblock the prim removal propagation on the whole scene indices chain _blockPrimRemovalPropagationSceneIndex = Fvp::BlockPrimRemovalPropagationSceneIndex::New(_inputSceneIndexOfFilteringSceneIndicesChain); + _pruningSceneIndex = Fvp::PruningSceneIndex::New(_blockPrimRemovalPropagationSceneIndex); _selection = std::make_shared(); - _selectionSceneIndex = Fvp::SelectionSceneIndex::New(_blockPrimRemovalPropagationSceneIndex, _selection); + _selectionSceneIndex = Fvp::SelectionSceneIndex::New(_pruningSceneIndex, _selection); _selectionSceneIndex->SetDisplayName("Flow Viewport Selection Scene Index"); _inputSceneIndexOfFilteringSceneIndicesChain = _selectionSceneIndex; diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.h b/lib/mayaHydra/mayaPlugin/renderOverride.h index a04d4b6c0..41cf634c1 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.h +++ b/lib/mayaHydra/mayaPlugin/renderOverride.h @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -280,6 +281,7 @@ class MtohRenderOverride : public MHWRender::MRenderOverride, Fvp::SelectionPtr _selection; Fvp::WireframeSelectionHighlightSceneIndexRefPtr _wireframeSelectionHighlightSceneIndex; Fvp::BlockPrimRemovalPropagationSceneIndexRefPtr _blockPrimRemovalPropagationSceneIndex; + Fvp::PruningSceneIndexRefPtr _pruningSceneIndex; Fvp::LightsManagementSceneIndexRefPtr _lightsManagementSceneIndex; // Naming this identifier _ufeSelection clashes with UFE's selection.h From 580eda8882988b5c91298a4545e4501461f1f3dd Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 10 Oct 2024 17:20:59 -0400 Subject: [PATCH 06/37] HYDRA-1098 : Implement GetPrim and GetChildPrimPaths --- .../sceneIndex/fvpPruningSceneIndex.cpp | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 328edde60..026656a32 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -63,12 +64,31 @@ PruningSceneIndex::PruningSceneIndex(HdSceneIndexBaseRefPtr const &inputSceneInd HdSceneIndexPrim PruningSceneIndex::GetPrim(const SdfPath& primPath) const { + for (const auto& filterEntry : _prunedPathsByFilter) { + if (filterEntry.second.find(primPath) != filterEntry.second.end()) { + return {}; + } + } return GetInputSceneIndex()->GetPrim(primPath); } SdfPathVector PruningSceneIndex::GetChildPrimPaths(const SdfPath& primPath) const { - return GetInputSceneIndex()->GetChildPrimPaths(primPath); + SdfPathVector baseChildPaths = GetInputSceneIndex()->GetChildPrimPaths(primPath); + SdfPathVector editedChildPaths; + for (const auto& baseChildPath : baseChildPaths) { + bool isPruned = false; + for (const auto& filterEntry : _prunedPathsByFilter) { + if (filterEntry.second.find(baseChildPath) != filterEntry.second.end()) { + isPruned = true; + break; + } + } + if (!isPruned) { + editedChildPaths.emplace_back(baseChildPath); + } + } + return editedChildPaths; } bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) From c68aa74346b74dd6e4781497320277a14139a88f Mon Sep 17 00:00:00 2001 From: debloip Date: Thu, 10 Oct 2024 17:28:49 -0400 Subject: [PATCH 07/37] HYDRA-1098 : Update filter map on enable/disable --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 026656a32..a40e115f9 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -98,6 +98,8 @@ bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) return false; } + _prunedPathsByFilter[pruningToken] = SdfPathSet(); + HdSceneIndexObserver::RemovedPrimEntries prunedPrims; for (const SdfPath& primPath: HdSceneIndexPrimView(GetInputSceneIndex())) { @@ -127,6 +129,8 @@ bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) unprunedPrims.emplace_back(primPath, GetInputSceneIndex()->GetPrim(primPath).primType); } + _prunedPathsByFilter.erase(pruningToken); + if (!unprunedPrims.empty()) { _SendPrimsAdded(unprunedPrims); } From 30387f1728433abd79cb4fccece315fe7dd9984a Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 11:34:20 -0400 Subject: [PATCH 08/37] HYDRA-108 : Exclude scene roots --- .../sceneIndex/fvpPruningSceneIndex.cpp | 39 ++++++++++++++----- .../sceneIndex/fvpPruningSceneIndex.h | 12 ++++++ 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index a40e115f9..63640a093 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -39,14 +39,6 @@ PXR_NAMESPACE_USING_DIRECTIVE namespace { -bool _PrunePrim(const HdSceneIndexPrim& prim, const TfToken& pruningToken) -{ - if (pruningToken == FvpPruningTokens->mesh) { - return prim.primType == HdPrimTypeTokens->mesh; - } - return false; -} - } // namespace namespace FVP_NS_DEF { @@ -62,6 +54,32 @@ PruningSceneIndex::PruningSceneIndex(HdSceneIndexBaseRefPtr const &inputSceneInd { } +void PruningSceneIndex::AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot) +{ + _excludedSceneRoots.emplace(sceneRoot); +} + +bool PruningSceneIndex::_IsExcluded(const PXR_NS::SdfPath& primPath) const +{ + for (const auto& excludedSceneRoot : _excludedSceneRoots) { + if (primPath.HasPrefix(excludedSceneRoot)) { + return true; + } + } + return false; +} + +bool PruningSceneIndex::_PrunePrim(const SdfPath& primPath, const HdSceneIndexPrim& prim, const TfToken& pruningToken) const +{ + if (_IsExcluded(primPath)) { + return false; + } + if (pruningToken == FvpPruningTokens->mesh) { + return prim.primType == HdPrimTypeTokens->mesh; + } + return false; +} + HdSceneIndexPrim PruningSceneIndex::GetPrim(const SdfPath& primPath) const { for (const auto& filterEntry : _prunedPathsByFilter) { @@ -102,7 +120,7 @@ bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) HdSceneIndexObserver::RemovedPrimEntries prunedPrims; - for (const SdfPath& primPath: HdSceneIndexPrimView(GetInputSceneIndex())) { + for (const SdfPath& primPath : HdSceneIndexPrimView(GetInputSceneIndex())) { if (_PrunePrim(GetInputSceneIndex()->GetPrim(primPath), pruningToken)) { _prunedPathsByFilter[pruningToken].emplace(primPath); prunedPrims.emplace_back(primPath); @@ -144,6 +162,7 @@ void PruningSceneIndex::_PrimsAdded( { HdSceneIndexObserver::AddedPrimEntries editedEntries; for (const auto& addedEntry : entries) { + // We're executing the full loop for each filter, so too many notification sent for (auto& filterEntry : _prunedPathsByFilter) { if (_PrunePrim(GetInputSceneIndex()->GetPrim(addedEntry.primPath), filterEntry.first)) { filterEntry.second.emplace(addedEntry.primPath); @@ -163,6 +182,7 @@ void PruningSceneIndex::_PrimsRemoved( { HdSceneIndexObserver::RemovedPrimEntries editedEntries; for (const auto& removedEntry : entries) { + // We're executing the full loop for each filter, so too many notification sent for (auto& filterEntry : _prunedPathsByFilter) { if (filterEntry.second.find(removedEntry.primPath) != filterEntry.second.end()) { filterEntry.second.erase(removedEntry.primPath); @@ -185,6 +205,7 @@ void PruningSceneIndex::_PrimsDirtied( HdSceneIndexObserver::AddedPrimEntries addedEntries; for (const auto& dirtiedEntry : entries) { + // We're executing the full loop for each filter, so too many notification sent for (const auto& filterEntry : _prunedPathsByFilter) { HdSceneIndexPrim dirtiedPrim = GetInputSceneIndex()->GetPrim(dirtiedEntry.primPath); diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 2d0cc6549..92da72f48 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -25,6 +25,7 @@ #include #include #include + #include #include @@ -74,6 +75,9 @@ class PruningSceneIndex : FVP_API bool DisableFilter(const PXR_NS::TfToken& filterToken); + FVP_API + void AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot); + FVP_API PrimSelections UfePathToPrimSelections(const Ufe::Path& appPath) const override { PXR_NAMESPACE_USING_DIRECTIVE; @@ -101,8 +105,16 @@ class PruningSceneIndex : const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) override; + FVP_API + bool _IsExcluded(const PXR_NS::SdfPath& primPath) const; + + FVP_API + bool _PrunePrim(const PXR_NS::SdfPath& primPath, const PXR_NS::HdSceneIndexPrim& prim, const PXR_NS::TfToken& pruningToken) const; + // Maps a filtering token to the set of prim paths that have been pruned out by this token std::map _prunedPathsByFilter; + + std::set _excludedSceneRoots; }; } // namespace FVP_NS_DEF From ae0e6ae43cd9cbbb8f4c3620010e3430a095d33a Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 12:06:03 -0400 Subject: [PATCH 09/37] HYDRA-1098 : Add ancestor check --- .../sceneIndex/fvpPruningSceneIndex.cpp | 57 ++++++++++++------- .../sceneIndex/fvpPruningSceneIndex.h | 4 ++ 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 63640a093..72048e45c 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -61,6 +61,7 @@ void PruningSceneIndex::AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot) bool PruningSceneIndex::_IsExcluded(const PXR_NS::SdfPath& primPath) const { + // TODO : Use parent-based approach for (const auto& excludedSceneRoot : _excludedSceneRoots) { if (primPath.HasPrefix(excludedSceneRoot)) { return true; @@ -80,13 +81,24 @@ bool PruningSceneIndex::_PrunePrim(const SdfPath& primPath, const HdSceneIndexPr return false; } -HdSceneIndexPrim PruningSceneIndex::GetPrim(const SdfPath& primPath) const +bool PruningSceneIndex::_IsAncestorPrunedInclusive(const SdfPath& primPath) const { - for (const auto& filterEntry : _prunedPathsByFilter) { - if (filterEntry.second.find(primPath) != filterEntry.second.end()) { - return {}; + SdfPath currPath = primPath; + while (!currPath.IsAbsoluteRootPath()) { + if (_filtersByPrunedPath.find(currPath) != _filtersByPrunedPath.end()) { + return true; + } else { + currPath = currPath.GetParentPath(); } } + return false; +} + +HdSceneIndexPrim PruningSceneIndex::GetPrim(const SdfPath& primPath) const +{ + if (_filtersByPrunedPath.find(primPath) != _filtersByPrunedPath.end()) { + return {}; + } return GetInputSceneIndex()->GetPrim(primPath); } @@ -95,14 +107,7 @@ SdfPathVector PruningSceneIndex::GetChildPrimPaths(const SdfPath& primPath) cons SdfPathVector baseChildPaths = GetInputSceneIndex()->GetChildPrimPaths(primPath); SdfPathVector editedChildPaths; for (const auto& baseChildPath : baseChildPaths) { - bool isPruned = false; - for (const auto& filterEntry : _prunedPathsByFilter) { - if (filterEntry.second.find(baseChildPath) != filterEntry.second.end()) { - isPruned = true; - break; - } - } - if (!isPruned) { + if (_filtersByPrunedPath.find(baseChildPath) == _filtersByPrunedPath.end()) { editedChildPaths.emplace_back(baseChildPath); } } @@ -116,14 +121,16 @@ bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) return false; } - _prunedPathsByFilter[pruningToken] = SdfPathSet(); - HdSceneIndexObserver::RemovedPrimEntries prunedPrims; for (const SdfPath& primPath : HdSceneIndexPrimView(GetInputSceneIndex())) { - if (_PrunePrim(GetInputSceneIndex()->GetPrim(primPath), pruningToken)) { + if (_PrunePrim(primPath, GetInputSceneIndex()->GetPrim(primPath), pruningToken)) { + if (!_IsAncestorPrunedInclusive(primPath)) { + // Only send notification if it was not already pruned out, directly or indirectly + prunedPrims.emplace_back(primPath); + } _prunedPathsByFilter[pruningToken].emplace(primPath); - prunedPrims.emplace_back(primPath); + _filtersByPrunedPath[primPath].emplace(pruningToken); } } @@ -141,13 +148,23 @@ bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) return false; } - HdSceneIndexObserver::AddedPrimEntries unprunedPrims; + SdfPathSet prunedPaths = _prunedPathsByFilter[pruningToken]; - for (const auto& primPath : _prunedPathsByFilter[pruningToken]) { - unprunedPrims.emplace_back(primPath, GetInputSceneIndex()->GetPrim(primPath).primType); + _prunedPathsByFilter.erase(pruningToken); + for (const auto& primPath : prunedPaths) { + _filtersByPrunedPath[primPath].erase(pruningToken); + if (_filtersByPrunedPath[primPath].empty()) { + _filtersByPrunedPath.erase(primPath); + } } - _prunedPathsByFilter.erase(pruningToken); + HdSceneIndexObserver::AddedPrimEntries unprunedPrims; + for (const auto& primPath : prunedPaths) { + // If it's still pruned, avoid sending a notification + if (!_IsAncestorPrunedInclusive(primPath)) { + unprunedPrims.emplace_back(primPath, GetInputSceneIndex()->GetPrim(primPath).primType); + } + } if (!unprunedPrims.empty()) { _SendPrimsAdded(unprunedPrims); diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 92da72f48..f41efaf04 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -111,8 +111,12 @@ class PruningSceneIndex : FVP_API bool _PrunePrim(const PXR_NS::SdfPath& primPath, const PXR_NS::HdSceneIndexPrim& prim, const PXR_NS::TfToken& pruningToken) const; + FVP_API + bool _IsAncestorPrunedInclusive(const PXR_NS::SdfPath& primPath) const; + // Maps a filtering token to the set of prim paths that have been pruned out by this token std::map _prunedPathsByFilter; + std::map> _filtersByPrunedPath; std::set _excludedSceneRoots; }; From b157daea76f0c45cadb9490cfb961c97392cdb46 Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 12:27:53 -0400 Subject: [PATCH 10/37] HYDRA-1098 : Handle all the different cases (hopefully) --- .../sceneIndex/fvpPruningSceneIndex.cpp | 54 ++++++++++++------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 72048e45c..572afe156 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -84,7 +84,7 @@ bool PruningSceneIndex::_PrunePrim(const SdfPath& primPath, const HdSceneIndexPr bool PruningSceneIndex::_IsAncestorPrunedInclusive(const SdfPath& primPath) const { SdfPath currPath = primPath; - while (!currPath.IsAbsoluteRootPath()) { + while (!currPath.IsEmpty() && !currPath.IsAbsoluteRootPath()) { if (_filtersByPrunedPath.find(currPath) != _filtersByPrunedPath.end()) { return true; } else { @@ -179,14 +179,15 @@ void PruningSceneIndex::_PrimsAdded( { HdSceneIndexObserver::AddedPrimEntries editedEntries; for (const auto& addedEntry : entries) { - // We're executing the full loop for each filter, so too many notification sent for (auto& filterEntry : _prunedPathsByFilter) { - if (_PrunePrim(GetInputSceneIndex()->GetPrim(addedEntry.primPath), filterEntry.first)) { + if (_PrunePrim(addedEntry.primPath, GetInputSceneIndex()->GetPrim(addedEntry.primPath), filterEntry.first)) { filterEntry.second.emplace(addedEntry.primPath); - } else { - editedEntries.emplace_back(addedEntry); + _filtersByPrunedPath[addedEntry.primPath].emplace(filterEntry.first); } } + if (!_IsAncestorPrunedInclusive(addedEntry.primPath)) { + editedEntries.emplace_back(addedEntry); + } } if (!editedEntries.empty()) { _SendPrimsAdded(editedEntries); @@ -199,14 +200,15 @@ void PruningSceneIndex::_PrimsRemoved( { HdSceneIndexObserver::RemovedPrimEntries editedEntries; for (const auto& removedEntry : entries) { - // We're executing the full loop for each filter, so too many notification sent for (auto& filterEntry : _prunedPathsByFilter) { if (filterEntry.second.find(removedEntry.primPath) != filterEntry.second.end()) { filterEntry.second.erase(removedEntry.primPath); - } else { - editedEntries.emplace_back(removedEntry); } } + _filtersByPrunedPath.erase(removedEntry.primPath); + if (!_IsAncestorPrunedInclusive(removedEntry.primPath)) { + editedEntries.emplace_back(removedEntry); + } } if (!editedEntries.empty()) { _SendPrimsRemoved(editedEntries); @@ -222,20 +224,34 @@ void PruningSceneIndex::_PrimsDirtied( HdSceneIndexObserver::AddedPrimEntries addedEntries; for (const auto& dirtiedEntry : entries) { - // We're executing the full loop for each filter, so too many notification sent - for (const auto& filterEntry : _prunedPathsByFilter) { - HdSceneIndexPrim dirtiedPrim = GetInputSceneIndex()->GetPrim(dirtiedEntry.primPath); - - bool isPruned = filterEntry.second.find(dirtiedEntry.primPath) != filterEntry.second.end(); - bool shouldBePruned = _PrunePrim(dirtiedPrim, filterEntry.first); + bool wasInitiallyPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); + HdSceneIndexPrim dirtiedPrim = GetInputSceneIndex()->GetPrim(dirtiedEntry.primPath); + for (auto& filterEntry : _prunedPathsByFilter) { + bool shouldBePruned = _PrunePrim(dirtiedEntry.primPath, dirtiedPrim, filterEntry.first); - if (!isPruned && shouldBePruned) { - removedEntries.emplace_back(dirtiedEntry.primPath); - } else if (isPruned && !shouldBePruned) { - addedEntries.emplace_back(dirtiedEntry.primPath, dirtiedPrim.primType); + if (shouldBePruned) { + filterEntry.second.emplace(dirtiedEntry.primPath); + _filtersByPrunedPath[dirtiedEntry.primPath].emplace(filterEntry.first); } else { - editedEntries.emplace_back(dirtiedEntry); + if (filterEntry.second.find(dirtiedEntry.primPath) != filterEntry.second.end()) { + filterEntry.second.erase(dirtiedEntry.primPath); + } + if (_filtersByPrunedPath.find(dirtiedEntry.primPath) != _filtersByPrunedPath.end()) { + _filtersByPrunedPath[dirtiedEntry.primPath].erase(filterEntry.first); + if (_filtersByPrunedPath[dirtiedEntry.primPath].empty()) { + _filtersByPrunedPath.erase(dirtiedEntry.primPath); + } + } } + + } + bool isNowPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); + if (!wasInitiallyPruned && isNowPruned) { + removedEntries.emplace_back(dirtiedEntry.primPath); + } else if (wasInitiallyPruned && !isNowPruned) { + addedEntries.emplace_back(dirtiedEntry.primPath, dirtiedPrim.primType); + } else { + editedEntries.emplace_back(dirtiedEntry); } } From 0a29f77d8cd37a2f342f7995cea715ebc44f8a9c Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 12:33:15 -0400 Subject: [PATCH 11/37] HYDRA-1098 : Refactor common code --- .../sceneIndex/fvpPruningSceneIndex.cpp | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 572afe156..84dc08227 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -39,6 +39,19 @@ PXR_NAMESPACE_USING_DIRECTIVE namespace { +template +bool _HasAncestorInclusiveInContainer(const SdfPath& path, const Container& pathsContainer) { + SdfPath currPath = path; + while (!currPath.IsEmpty() && !currPath.IsAbsoluteRootPath()) { + if (pathsContainer.find(currPath) != pathsContainer.end()) { + return true; + } else { + currPath = currPath.GetParentPath(); + } + } + return false; +} + } // namespace namespace FVP_NS_DEF { @@ -61,13 +74,7 @@ void PruningSceneIndex::AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot) bool PruningSceneIndex::_IsExcluded(const PXR_NS::SdfPath& primPath) const { - // TODO : Use parent-based approach - for (const auto& excludedSceneRoot : _excludedSceneRoots) { - if (primPath.HasPrefix(excludedSceneRoot)) { - return true; - } - } - return false; + return _HasAncestorInclusiveInContainer(primPath, _excludedSceneRoots); } bool PruningSceneIndex::_PrunePrim(const SdfPath& primPath, const HdSceneIndexPrim& prim, const TfToken& pruningToken) const @@ -83,15 +90,7 @@ bool PruningSceneIndex::_PrunePrim(const SdfPath& primPath, const HdSceneIndexPr bool PruningSceneIndex::_IsAncestorPrunedInclusive(const SdfPath& primPath) const { - SdfPath currPath = primPath; - while (!currPath.IsEmpty() && !currPath.IsAbsoluteRootPath()) { - if (_filtersByPrunedPath.find(currPath) != _filtersByPrunedPath.end()) { - return true; - } else { - currPath = currPath.GetParentPath(); - } - } - return false; + return _HasAncestorInclusiveInContainer(primPath, _filtersByPrunedPath); } HdSceneIndexPrim PruningSceneIndex::GetPrim(const SdfPath& primPath) const From e05f9dfc9bfac3026e3f80e63f80eaf7367d7334 Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 12:56:46 -0400 Subject: [PATCH 12/37] HYDRA-1098 : Refactor common code --- .../sceneIndex/fvpPruningSceneIndex.cpp | 48 ++++++++++--------- .../sceneIndex/fvpPruningSceneIndex.h | 10 +++- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 84dc08227..4cccb528d 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -172,6 +172,26 @@ bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) return true; } +void PruningSceneIndex::_InsertEntry(const PXR_NS::SdfPath& primPath, const PXR_NS::TfToken& pruningToken) +{ + _prunedPathsByFilter[pruningToken].emplace(primPath); + _filtersByPrunedPath[primPath].emplace(pruningToken); +} + +void PruningSceneIndex::_RemoveEntry(const PXR_NS::SdfPath& primPath, const PXR_NS::TfToken& pruningToken) +{ + if (_prunedPathsByFilter.find(pruningToken) != _prunedPathsByFilter.end()) { + _prunedPathsByFilter[pruningToken].erase(primPath); + } + + if (_filtersByPrunedPath.find(primPath) != _filtersByPrunedPath.end()) { + _filtersByPrunedPath[primPath].erase(pruningToken); + if (_filtersByPrunedPath[primPath].empty()) { + _filtersByPrunedPath.erase(primPath); + } + } +} + void PruningSceneIndex::_PrimsAdded( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::AddedPrimEntries &entries) @@ -180,8 +200,7 @@ void PruningSceneIndex::_PrimsAdded( for (const auto& addedEntry : entries) { for (auto& filterEntry : _prunedPathsByFilter) { if (_PrunePrim(addedEntry.primPath, GetInputSceneIndex()->GetPrim(addedEntry.primPath), filterEntry.first)) { - filterEntry.second.emplace(addedEntry.primPath); - _filtersByPrunedPath[addedEntry.primPath].emplace(filterEntry.first); + _InsertEntry(addedEntry.primPath, filterEntry.first); } } if (!_IsAncestorPrunedInclusive(addedEntry.primPath)) { @@ -200,11 +219,8 @@ void PruningSceneIndex::_PrimsRemoved( HdSceneIndexObserver::RemovedPrimEntries editedEntries; for (const auto& removedEntry : entries) { for (auto& filterEntry : _prunedPathsByFilter) { - if (filterEntry.second.find(removedEntry.primPath) != filterEntry.second.end()) { - filterEntry.second.erase(removedEntry.primPath); - } + _RemoveEntry(removedEntry.primPath, filterEntry.first); } - _filtersByPrunedPath.erase(removedEntry.primPath); if (!_IsAncestorPrunedInclusive(removedEntry.primPath)) { editedEntries.emplace_back(removedEntry); } @@ -218,31 +234,19 @@ void PruningSceneIndex::_PrimsDirtied( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) { - HdSceneIndexObserver::DirtiedPrimEntries editedEntries; HdSceneIndexObserver::RemovedPrimEntries removedEntries; HdSceneIndexObserver::AddedPrimEntries addedEntries; + HdSceneIndexObserver::DirtiedPrimEntries editedEntries; for (const auto& dirtiedEntry : entries) { bool wasInitiallyPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); HdSceneIndexPrim dirtiedPrim = GetInputSceneIndex()->GetPrim(dirtiedEntry.primPath); for (auto& filterEntry : _prunedPathsByFilter) { - bool shouldBePruned = _PrunePrim(dirtiedEntry.primPath, dirtiedPrim, filterEntry.first); - - if (shouldBePruned) { - filterEntry.second.emplace(dirtiedEntry.primPath); - _filtersByPrunedPath[dirtiedEntry.primPath].emplace(filterEntry.first); + if (_PrunePrim(dirtiedEntry.primPath, dirtiedPrim, filterEntry.first)) { + _InsertEntry(dirtiedEntry.primPath, filterEntry.first); } else { - if (filterEntry.second.find(dirtiedEntry.primPath) != filterEntry.second.end()) { - filterEntry.second.erase(dirtiedEntry.primPath); - } - if (_filtersByPrunedPath.find(dirtiedEntry.primPath) != _filtersByPrunedPath.end()) { - _filtersByPrunedPath[dirtiedEntry.primPath].erase(filterEntry.first); - if (_filtersByPrunedPath[dirtiedEntry.primPath].empty()) { - _filtersByPrunedPath.erase(dirtiedEntry.primPath); - } - } + _RemoveEntry(dirtiedEntry.primPath, filterEntry.first); } - } bool isNowPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); if (!wasInitiallyPruned && isNowPruned) { diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index f41efaf04..2c7f1bf69 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -70,10 +70,10 @@ class PruningSceneIndex : PXR_NS::SdfPathVector GetChildPrimPaths(const PXR_NS::SdfPath& primPath) const override; FVP_API - bool EnableFilter(const PXR_NS::TfToken& filterToken); + bool EnableFilter(const PXR_NS::TfToken& pruningToken); FVP_API - bool DisableFilter(const PXR_NS::TfToken& filterToken); + bool DisableFilter(const PXR_NS::TfToken& pruningToken); FVP_API void AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot); @@ -104,6 +104,12 @@ class PruningSceneIndex : void _PrimsDirtied( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) override; + + FVP_API + void _InsertEntry(const PXR_NS::SdfPath& primPath, const PXR_NS::TfToken& pruningToken); + + FVP_API + void _RemoveEntry(const PXR_NS::SdfPath& primPath, const PXR_NS::TfToken& pruningToken); FVP_API bool _IsExcluded(const PXR_NS::SdfPath& primPath) const; From 4b543d20417e589bf2fa9e25ebd52365e52ff411 Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:01:15 -0400 Subject: [PATCH 13/37] HYDRA-1098 : Provide accessor for active filters --- .../sceneIndex/fvpPruningSceneIndex.cpp | 27 ++++++++++++------- .../sceneIndex/fvpPruningSceneIndex.h | 3 +++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 4cccb528d..9154666da 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -172,6 +172,15 @@ bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) return true; } +std::set PruningSceneIndex::GetActiveFilters() +{ + std::set pruningTokens; + for (const auto& filterEntry : _prunedPathsByFilter) { + pruningTokens.emplace(filterEntry.first); + } + return pruningTokens; +} + void PruningSceneIndex::_InsertEntry(const PXR_NS::SdfPath& primPath, const PXR_NS::TfToken& pruningToken) { _prunedPathsByFilter[pruningToken].emplace(primPath); @@ -198,9 +207,9 @@ void PruningSceneIndex::_PrimsAdded( { HdSceneIndexObserver::AddedPrimEntries editedEntries; for (const auto& addedEntry : entries) { - for (auto& filterEntry : _prunedPathsByFilter) { - if (_PrunePrim(addedEntry.primPath, GetInputSceneIndex()->GetPrim(addedEntry.primPath), filterEntry.first)) { - _InsertEntry(addedEntry.primPath, filterEntry.first); + for (const auto& pruningToken : GetActiveFilters()) { + if (_PrunePrim(addedEntry.primPath, GetInputSceneIndex()->GetPrim(addedEntry.primPath), pruningToken)) { + _InsertEntry(addedEntry.primPath, pruningToken); } } if (!_IsAncestorPrunedInclusive(addedEntry.primPath)) { @@ -218,8 +227,8 @@ void PruningSceneIndex::_PrimsRemoved( { HdSceneIndexObserver::RemovedPrimEntries editedEntries; for (const auto& removedEntry : entries) { - for (auto& filterEntry : _prunedPathsByFilter) { - _RemoveEntry(removedEntry.primPath, filterEntry.first); + for (const auto& pruningToken : GetActiveFilters()) { + _RemoveEntry(removedEntry.primPath, pruningToken); } if (!_IsAncestorPrunedInclusive(removedEntry.primPath)) { editedEntries.emplace_back(removedEntry); @@ -241,11 +250,11 @@ void PruningSceneIndex::_PrimsDirtied( for (const auto& dirtiedEntry : entries) { bool wasInitiallyPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); HdSceneIndexPrim dirtiedPrim = GetInputSceneIndex()->GetPrim(dirtiedEntry.primPath); - for (auto& filterEntry : _prunedPathsByFilter) { - if (_PrunePrim(dirtiedEntry.primPath, dirtiedPrim, filterEntry.first)) { - _InsertEntry(dirtiedEntry.primPath, filterEntry.first); + for (const auto& pruningToken : GetActiveFilters()) { + if (_PrunePrim(dirtiedEntry.primPath, dirtiedPrim, pruningToken)) { + _InsertEntry(dirtiedEntry.primPath, pruningToken); } else { - _RemoveEntry(dirtiedEntry.primPath, filterEntry.first); + _RemoveEntry(dirtiedEntry.primPath, pruningToken); } } bool isNowPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 2c7f1bf69..417bd88ce 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -75,6 +75,9 @@ class PruningSceneIndex : FVP_API bool DisableFilter(const PXR_NS::TfToken& pruningToken); + FVP_API + std::set GetActiveFilters(); + FVP_API void AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot); From 34e68cd990837e729433b54b0898602ec4b2e262 Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:01:51 -0400 Subject: [PATCH 14/37] HYDRA-1098 : Adjust comment --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 417bd88ce..29b4fe71f 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -123,7 +123,7 @@ class PruningSceneIndex : FVP_API bool _IsAncestorPrunedInclusive(const PXR_NS::SdfPath& primPath) const; - // Maps a filtering token to the set of prim paths that have been pruned out by this token + // Maps a pruning token to the set of prim paths that have been pruned out by this token std::map _prunedPathsByFilter; std::map> _filtersByPrunedPath; From aa23f843a219152a106e3866cafcac5b49f88555 Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:05:52 -0400 Subject: [PATCH 15/37] HYDRA-1098 : Legibility improvements --- .../sceneIndex/fvpPruningSceneIndex.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 9154666da..b8887f34d 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -206,16 +206,19 @@ void PruningSceneIndex::_PrimsAdded( const PXR_NS::HdSceneIndexObserver::AddedPrimEntries &entries) { HdSceneIndexObserver::AddedPrimEntries editedEntries; + for (const auto& addedEntry : entries) { for (const auto& pruningToken : GetActiveFilters()) { if (_PrunePrim(addedEntry.primPath, GetInputSceneIndex()->GetPrim(addedEntry.primPath), pruningToken)) { _InsertEntry(addedEntry.primPath, pruningToken); } } + if (!_IsAncestorPrunedInclusive(addedEntry.primPath)) { editedEntries.emplace_back(addedEntry); } } + if (!editedEntries.empty()) { _SendPrimsAdded(editedEntries); } @@ -226,14 +229,17 @@ void PruningSceneIndex::_PrimsRemoved( const PXR_NS::HdSceneIndexObserver::RemovedPrimEntries &entries) { HdSceneIndexObserver::RemovedPrimEntries editedEntries; + for (const auto& removedEntry : entries) { - for (const auto& pruningToken : GetActiveFilters()) { - _RemoveEntry(removedEntry.primPath, pruningToken); - } if (!_IsAncestorPrunedInclusive(removedEntry.primPath)) { editedEntries.emplace_back(removedEntry); + } else { + for (const auto& pruningToken : GetActiveFilters()) { + _RemoveEntry(removedEntry.primPath, pruningToken); + } } } + if (!editedEntries.empty()) { _SendPrimsRemoved(editedEntries); } @@ -249,7 +255,9 @@ void PruningSceneIndex::_PrimsDirtied( for (const auto& dirtiedEntry : entries) { bool wasInitiallyPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); + HdSceneIndexPrim dirtiedPrim = GetInputSceneIndex()->GetPrim(dirtiedEntry.primPath); + for (const auto& pruningToken : GetActiveFilters()) { if (_PrunePrim(dirtiedEntry.primPath, dirtiedPrim, pruningToken)) { _InsertEntry(dirtiedEntry.primPath, pruningToken); @@ -257,7 +265,9 @@ void PruningSceneIndex::_PrimsDirtied( _RemoveEntry(dirtiedEntry.primPath, pruningToken); } } + bool isNowPruned = _IsAncestorPrunedInclusive(dirtiedEntry.primPath); + if (!wasInitiallyPruned && isNowPruned) { removedEntries.emplace_back(dirtiedEntry.primPath); } else if (wasInitiallyPruned && !isNowPruned) { From d313b1b91cd29cdb480c39da378a711988f3c96f Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:15:05 -0400 Subject: [PATCH 16/37] HYDRA-1098 : Minor touchups for consistency --- .../sceneIndex/fvpPruningSceneIndex.cpp | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index b8887f34d..b66d45aee 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -120,6 +120,9 @@ bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) return false; } + // Enable the filter + _prunedPathsByFilter[pruningToken] = SdfPathSet(); + HdSceneIndexObserver::RemovedPrimEntries prunedPrims; for (const SdfPath& primPath : HdSceneIndexPrimView(GetInputSceneIndex())) { @@ -128,8 +131,7 @@ bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) // Only send notification if it was not already pruned out, directly or indirectly prunedPrims.emplace_back(primPath); } - _prunedPathsByFilter[pruningToken].emplace(primPath); - _filtersByPrunedPath[primPath].emplace(pruningToken); + _InsertEntry(primPath, pruningToken); } } @@ -147,24 +149,20 @@ bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) return false; } - SdfPathSet prunedPaths = _prunedPathsByFilter[pruningToken]; - - _prunedPathsByFilter.erase(pruningToken); - for (const auto& primPath : prunedPaths) { - _filtersByPrunedPath[primPath].erase(pruningToken); - if (_filtersByPrunedPath[primPath].empty()) { - _filtersByPrunedPath.erase(primPath); - } - } - HdSceneIndexObserver::AddedPrimEntries unprunedPrims; + + SdfPathSet prunedPaths = _prunedPathsByFilter[pruningToken]; for (const auto& primPath : prunedPaths) { - // If it's still pruned, avoid sending a notification + _RemoveEntry(primPath, pruningToken); if (!_IsAncestorPrunedInclusive(primPath)) { + // Only send notification if it was pruned and no longer is unprunedPrims.emplace_back(primPath, GetInputSceneIndex()->GetPrim(primPath).primType); } } + // Disable the filter + _prunedPathsByFilter.erase(pruningToken); + if (!unprunedPrims.empty()) { _SendPrimsAdded(unprunedPrims); } From 88c4bbc5a8f51224d6c15a759c06e56a9c1eaf6d Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:18:56 -0400 Subject: [PATCH 17/37] HYDRA-1098 : Add filtering tokens --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 29b4fe71f..8e114da69 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -33,10 +33,16 @@ PXR_NAMESPACE_OPEN_SCOPE // clang-format off #define FVP_PRUNING_TOKENS \ - (mesh) \ - (sphere) \ - (cone) \ - (cube) + (meshes) \ + (capsules) \ + (cones) \ + (cubes) \ + (cylinders) \ + (spheres) \ + (nurbsPatches) \ + (nurbsCurves) \ + (lightGizmos) \ + (cameraGizmos) // clang-format on TF_DECLARE_PUBLIC_TOKENS(FvpPruningTokens, FVP_API, FVP_PRUNING_TOKENS); From cb21f9ad001d9511e94b766c066adcb194ec25d5 Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:19:25 -0400 Subject: [PATCH 18/37] HYDRA-1098 : Remove unimplementable tokens for now --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 8e114da69..5d59759e2 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -41,8 +41,6 @@ PXR_NAMESPACE_OPEN_SCOPE (spheres) \ (nurbsPatches) \ (nurbsCurves) \ - (lightGizmos) \ - (cameraGizmos) // clang-format on TF_DECLARE_PUBLIC_TOKENS(FvpPruningTokens, FVP_API, FVP_PRUNING_TOKENS); From 239e0feb3a016a4e9cc58674baf23f298275a1cf Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:30:33 -0400 Subject: [PATCH 19/37] HYDRA-1098 : Implement various filter handlers --- .../sceneIndex/fvpPruningSceneIndex.cpp | 57 +++++++++++++++++-- .../sceneIndex/fvpPruningSceneIndex.h | 2 +- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index b66d45aee..87fcf5452 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -27,6 +27,7 @@ #include #include +#include #include PXR_NAMESPACE_OPEN_SCOPE @@ -52,6 +53,46 @@ bool _HasAncestorInclusiveInContainer(const SdfPath& path, const Container& path return false; } +bool _MeshesFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->mesh; +} + +bool _CapsulesFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->capsule; +} + +bool _ConesFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->cone; +} + +bool _CubesFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->cube; +} + +bool _CylindersFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->cylinder; +} + +bool _SpheresFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->sphere; +} + +bool _NurbsCurvesFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->nurbsCurves; +} + +bool _NurbsPatchesFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) +{ + return prim.primType == HdPrimTypeTokens->nurbsPatch; +} + } // namespace namespace FVP_NS_DEF { @@ -82,10 +123,18 @@ bool PruningSceneIndex::_PrunePrim(const SdfPath& primPath, const HdSceneIndexPr if (_IsExcluded(primPath)) { return false; } - if (pruningToken == FvpPruningTokens->mesh) { - return prim.primType == HdPrimTypeTokens->mesh; - } - return false; + using FilterHandler = std::function; + static std::map filterHandlers = { + { FvpPruningTokens->meshes, _MeshesFilterHandler }, + { FvpPruningTokens->capsules, _CapsulesFilterHandler }, + { FvpPruningTokens->cones, _ConesFilterHandler }, + { FvpPruningTokens->cubes, _CubesFilterHandler }, + { FvpPruningTokens->cylinders, _CylindersFilterHandler }, + { FvpPruningTokens->spheres, _SpheresFilterHandler }, + { FvpPruningTokens->nurbsCurves, _NurbsCurvesFilterHandler }, + { FvpPruningTokens->nurbsPatches, _NurbsPatchesFilterHandler } + }; + return filterHandlers[pruningToken](GetInputSceneIndex(), primPath, prim); } bool PruningSceneIndex::_IsAncestorPrunedInclusive(const SdfPath& primPath) const diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 5d59759e2..a534d0882 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -39,8 +39,8 @@ PXR_NAMESPACE_OPEN_SCOPE (cubes) \ (cylinders) \ (spheres) \ - (nurbsPatches) \ (nurbsCurves) \ + (nurbsPatches) \ // clang-format on TF_DECLARE_PUBLIC_TOKENS(FvpPruningTokens, FVP_API, FVP_PRUNING_TOKENS); From d9b3a65bcef84044c368461eb2b8a0effbc22cad Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 13:41:56 -0400 Subject: [PATCH 20/37] HYDRA-1098 : Plug Maya filters to Fvp pruning scene index --- lib/mayaHydra/mayaPlugin/renderOverride.cpp | 38 +++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index 62f72dc7b..6d40150ff 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -803,12 +803,38 @@ MStatus MtohRenderOverride::Render( _displayStyleSceneIndex->SetRefineLevel({true, delegateParams.refineLevel}); } - auto objectExclusions = framecontext->objectTypeExclusions(); - if (objectExclusions & MHWRender::MFrameContext::kExcludeMeshes) { - _pruningSceneIndex->EnableFilter(FvpPruningTokens->mesh); - } else { - _pruningSceneIndex->DisableFilter(FvpPruningTokens->mesh); - } + // Update "Show" menu filters + { + auto objectExclusions = framecontext->objectTypeExclusions(); + + TfTokenVector polygonFilters = { + FvpPruningTokens->meshes, + FvpPruningTokens->capsules, + FvpPruningTokens->cones, + FvpPruningTokens->cubes, + FvpPruningTokens->cylinders, + FvpPruningTokens->spheres + }; + for (const auto& polygonFilter : polygonFilters) { + if (objectExclusions & MHWRender::MFrameContext::kExcludeMeshes) { + _pruningSceneIndex->EnableFilter(polygonFilter); + } else { + _pruningSceneIndex->DisableFilter(polygonFilter); + } + } + + if (objectExclusions & MHWRender::MFrameContext::kExcludeNurbsCurves) { + _pruningSceneIndex->EnableFilter(FvpPruningTokens->nurbsCurves); + } else { + _pruningSceneIndex->DisableFilter(FvpPruningTokens->nurbsCurves); + } + + if (objectExclusions & MHWRender::MFrameContext::kExcludeNurbsSurfaces) { + _pruningSceneIndex->EnableFilter(FvpPruningTokens->nurbsPatches); + } else { + _pruningSceneIndex->DisableFilter(FvpPruningTokens->nurbsPatches); + } + } // Toggle textures in the material network const unsigned int currentDisplayMode = drawContext.getDisplayStyle(); From 36a1013a2b6ccd6a31fda22b39554f63de71f2ca Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 14:35:00 -0400 Subject: [PATCH 21/37] HYDRA-1098 : Restructure Maya plugging code --- lib/mayaHydra/mayaPlugin/renderOverride.cpp | 33 ++++++++++----------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index 6d40150ff..2b038187a 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -114,6 +114,7 @@ #include #include #include +#include #include #include @@ -807,7 +808,7 @@ MStatus MtohRenderOverride::Render( { auto objectExclusions = framecontext->objectTypeExclusions(); - TfTokenVector polygonFilters = { + static TfTokenVector polygonFilters = { FvpPruningTokens->meshes, FvpPruningTokens->capsules, FvpPruningTokens->cones, @@ -815,24 +816,20 @@ MStatus MtohRenderOverride::Render( FvpPruningTokens->cylinders, FvpPruningTokens->spheres }; - for (const auto& polygonFilter : polygonFilters) { - if (objectExclusions & MHWRender::MFrameContext::kExcludeMeshes) { - _pruningSceneIndex->EnableFilter(polygonFilter); - } else { - _pruningSceneIndex->DisableFilter(polygonFilter); - } - } - - if (objectExclusions & MHWRender::MFrameContext::kExcludeNurbsCurves) { - _pruningSceneIndex->EnableFilter(FvpPruningTokens->nurbsCurves); - } else { - _pruningSceneIndex->DisableFilter(FvpPruningTokens->nurbsCurves); - } + static std::map mayaFiltersToFvpPruningTokens = { + { MHWRender::MFrameContext::kExcludeMeshes, polygonFilters }, + { MHWRender::MFrameContext::kExcludeNurbsCurves, {FvpPruningTokens->nurbsCurves} }, + { MHWRender::MFrameContext::kExcludeNurbsSurfaces, {FvpPruningTokens->nurbsPatches} } + }; - if (objectExclusions & MHWRender::MFrameContext::kExcludeNurbsSurfaces) { - _pruningSceneIndex->EnableFilter(FvpPruningTokens->nurbsPatches); - } else { - _pruningSceneIndex->DisableFilter(FvpPruningTokens->nurbsPatches); + for (auto [mayaFilter, fvpPruningTokens] : mayaFiltersToFvpPruningTokens) { + for (const auto& fvpPruningToken : fvpPruningTokens) { + if (objectExclusions & mayaFilter) { + _pruningSceneIndex->EnableFilter(fvpPruningToken); + } else { + _pruningSceneIndex->DisableFilter(fvpPruningToken); + } + } } } From f8a0f70f105e3e4c2f0ac7f69daccc781b27258d Mon Sep 17 00:00:00 2001 From: debloip Date: Fri, 11 Oct 2024 15:33:03 -0400 Subject: [PATCH 22/37] HYDRA-1098 : Add comment --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 87fcf5452..6e713f53f 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -55,6 +55,8 @@ bool _HasAncestorInclusiveInContainer(const SdfPath& path, const Container& path bool _MeshesFilterHandler(const HdSceneIndexBaseRefPtr& sceneIndex, const SdfPath& primPath, const HdSceneIndexPrim& prim) { + // Currently we just flat out remove any prim with a mesh type. If we were to add extra checks to make sure this is not + // a mesh prim that serves another purpose, we would add them here. return prim.primType == HdPrimTypeTokens->mesh; } From 1fd1afba37b69d617eb1379024df2935eec8ef09 Mon Sep 17 00:00:00 2001 From: debloip Date: Tue, 15 Oct 2024 15:51:32 -0400 Subject: [PATCH 23/37] HYDRA-1098 : Add filter tests with USD data for polygon and nurbs curve filters --- .../nurbsCurves_USD_excluded.png | Bin 0 -> 1563 bytes .../nurbsCurves_USD_included.png | Bin 0 -> 5176 bytes .../polygons_USD_excluded.png | Bin 0 -> 1563 bytes .../polygons_USD_included.png | Bin 0 -> 13820 bytes .../render/mayaToHydra/testViewportFilters.py | 63 ++++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsCurves_USD_excluded.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsCurves_USD_included.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_USD_excluded.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_USD_included.png diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsCurves_USD_excluded.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsCurves_USD_excluded.png new file mode 100644 index 0000000000000000000000000000000000000000..dbedef32fd8f3b0a32f32b3420710101c9e1097e GIT binary patch literal 1563 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKL9Be?5hW%z|fD~V9glC$sFM}44%>l$9a4C2) zkmSsFb1Me(LBuVsZRZ#mSZ8{=IEGZrd3)87mqAhBz=6jl>*{4Q7RWmpEncvH-OQg1 z53bZ(Gc=e>axio@GE9&drAC8bG!=|ygwe8q#>HXI_W%}?wyzd{fMqrAGM&NG)z4*} HQ$iB}d4q$r literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsCurves_USD_included.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsCurves_USD_included.png new file mode 100644 index 0000000000000000000000000000000000000000..ddd8f44330797b25ee941c92554051223826331b GIT binary patch literal 5176 zcmeG=XH-*Lvq_8+u%sYWgaD!U+;AyUB7_z}njjz$X(~l2(lHtYDJE2dbm@o`K?DV* zNDrW(flw7eFVc;Lzy%b(!@b|%x7Pdle!Q%;Pxh2OGiPS@>^&#Z>a5989$_932z1oU zlwbn_fm8Pf>=1yVwEy`U_&et1V0OvE0wfR2VZhk`F>UVwPi}u>2u+EYac8hpX=k}n$24YgOJ8=E5XBRD3 zX_L3D^Nzkkp?I2_B3j08Rjv#_s$}0o^g66(EPef0b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=!v}NWBnD+xB!$`Vy^4vpi28M<$QGB%^HoM z3Bb6-stD)ztx?Z`2KRJ4QKH6=oLvL`e0JM#Cp0IwDJKQwCTMNonTg-(YHJs>_^HK> zh(oCnLe~xr5Zxqn#xQunp`wQqM)d}TB9Z0IauVnCBo9)i&w)JPOiLCx5n~#R!7Y{;ip`;(a#a))f&kAo#kMoMIqR;`9w*Cu| zqRvwIS*V=3YdqsT`{wS8O-_UR)ZG;rg3(~`v0D$mfkay|{K&k&j~xSM9gAe%xehfb z?A)JDSul9A6uz+NACw#v7JU4Xzq@&+EjI#Id_F6yK_U|rO>yE_(5p4$LD9259E(`4 z1r%B})dmO^(6+sL6|^ng8Dj&5nSaV^OEgm;0>q+~W8`48L>V_C%b5pRb?7w)7jdE}U<;);|q=$oro^_<_uf&JrFQT)h1sCezw} literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_USD_excluded.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_USD_excluded.png new file mode 100644 index 0000000000000000000000000000000000000000..dbedef32fd8f3b0a32f32b3420710101c9e1097e GIT binary patch literal 1563 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKL9Be?5hW%z|fD~V9glC$sFM}44%>l$9a4C2) zkmSsFb1Me(LBuVsZRZ#mSZ8{=IEGZrd3)87mqAhBz=6jl>*{4Q7RWmpEncvH-OQg1 z53bZ(Gc=e>axio@GE9&drAC8bG!=|ygwe8q#>HXI_W%}?wyzd{fMqrAGM&NG)z4*} HQ$iB}d4q$r literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_USD_included.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_USD_included.png new file mode 100644 index 0000000000000000000000000000000000000000..9f33a504754ea0de12f2d03b2dc115545a3acf9a GIT binary patch literal 13820 zcmeIZS6EY9*e;5I3Mf^2@6wxq7`h}7kPe|L7!WB^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4nVzp|w%0I!^Q7q)Gtr1L4Be6TkE1?C4Jxqk+DQHZ|}Y$}|(l9HlrJqkYw!Ri66 zi%M-|+L1UWia2RuhQbDYL5!i`uu(D)sJc8qD4DNnaLTyF%}7X)SPF2oRA`S|%i{|{%vS1bSk literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py index a09780cfa..524127119 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py @@ -14,8 +14,13 @@ # import maya.cmds as cmds import fixturesUtils +import functools +import mayaUsd_createStageWithNewLayer +import mayaUsd.lib import mayaUtils import mtohUtils +import testUtils +import usdUtils # Note : the order of the bit flags does not correspond to the order # of the options in the "Show" -> "Viewport" UI. @@ -103,6 +108,8 @@ def checkFilter(self, name, exclusionMask, cameraDistance=15): # Restore old mask cmds.modelEditor(activeViewport, edit=True, excludeObjectMask=oldMask) + # --- Maya data --- + # TODO : Construction planes (not working in Hydra as of 2024-05-03) def test_Dimensions(self): @@ -222,5 +229,61 @@ def test_Strokes(self): # TODO : Texture Placements (not working in Hydra as of 2024-05-03) + # --- USD data --- + + def test_UsdPolygons(self): + from pxr import UsdGeom + + stagePath = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() + stage = mayaUsd.lib.GetPrim(stagePath).GetStage() + + capsuleName = "UsdCapsule" + capsuleXform = UsdGeom.Xform.Define(stage, "/" + capsuleName + "Xform") + capsuleXform.AddTranslateOp().Set(value=(6, 0, 0)) + UsdGeom.Capsule.Define(stage, str(capsuleXform.GetPath()) + "/" + capsuleName) + cmds.select(clear=True) + + coneName = "UsdCone" + coneXform = UsdGeom.Xform.Define(stage, "/" + coneName + "Xform") + coneXform.AddTranslateOp().Set(value=(2, 0, -2)) + UsdGeom.Cone.Define(stage, str(coneXform.GetPath()) + "/" + coneName) + cmds.select(clear=True) + + cubeName = "UsdCube" + cubeXform = UsdGeom.Xform.Define(stage, "/" + cubeName + "Xform") + cubeXform.AddTranslateOp().Set(value=(-3, 0, -3)) + UsdGeom.Cube.Define(stage, str(cubeXform.GetPath()) + "/" + cubeName) + cmds.select(clear=True) + + cylinderName = "UsdCylinder" + cylinderXform = UsdGeom.Xform.Define(stage, "/" + cylinderName + "Xform") + cylinderXform.AddTranslateOp().Set(value=(-2, 0, 2)) + UsdGeom.Cylinder.Define(stage, str(cylinderXform.GetPath()) + "/" + cylinderName) + cmds.select(clear=True) + + sphereName = "UsdSphere" + sphereXform = UsdGeom.Xform.Define(stage, "/" + sphereName + "Xform") + sphereXform.AddTranslateOp().Set(value=(0, 0, 6)) + UsdGeom.Sphere.Define(stage, str(sphereXform.GetPath()) + "/" + sphereName) + cmds.select(clear=True) + + cmds.polyTorus() + cmds.move(3, 0, 3) + cmds.select(clear=True) + + cmds.refresh() + self.checkFilter("polygons_USD", kExcludeMeshes, 10) + + def test_UsdNurbsCurves(self): + def createUsdCurve(stagePath): + circleName = cmds.circle() + usdCircleName = mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(circleName[0], long=True)[0], stagePath) + cmds.select(circleName) + cmds.delete() + cmds.select(usdCircleName) + stagePath = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() + self.stackInstances(functools.partial(createUsdCurve, stagePath), 50, [0, 0, 0.005]) + self.checkFilter("nurbsCurves_USD", kExcludeNurbsCurves, 2) + if __name__ == '__main__': fixturesUtils.runTests(globals()) From 751dece8b5e52d64cd38b58b29414238d9c5d15d Mon Sep 17 00:00:00 2001 From: debloip Date: Tue, 15 Oct 2024 16:12:29 -0400 Subject: [PATCH 24/37] HYDRA-1098 : Add filter test with USD data for nurbs patches filter --- .../nurbsPatches_USD_excluded.png | Bin 0 -> 1563 bytes .../nurbsPatches_USD_included.png | Bin 0 -> 20117 bytes .../render/mayaToHydra/testViewportFilters.py | 13 +++++++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsPatches_USD_excluded.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsPatches_USD_included.png diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsPatches_USD_excluded.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsPatches_USD_excluded.png new file mode 100644 index 0000000000000000000000000000000000000000..dbedef32fd8f3b0a32f32b3420710101c9e1097e GIT binary patch literal 1563 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKL9Be?5hW%z|fD~V9glC$sFM}44%>l$9a4C2) zkmSsFb1Me(LBuVsZRZ#mSZ8{=IEGZrd3)87mqAhBz=6jl>*{4Q7RWmpEncvH-OQg1 z53bZ(Gc=e>axio@GE9&drAC8bG!=|ygwe8q#>HXI_W%}?wyzd{fMqrAGM&NG)z4*} HQ$iB}d4q$r literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsPatches_USD_included.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/nurbsPatches_USD_included.png new file mode 100644 index 0000000000000000000000000000000000000000..6c42ebcf78abd4df79bcb3fecc85c187be93b258 GIT binary patch literal 20117 zcmeEu`#aNr{I^q$oXM2KFsEWDl^o_gXC>t@XTrxRMeMa_0$fWeYSk4Edkm|6L~K8U`2` z#2HKwx>l%{YxxstqT^x54p4(2@0&#)8oJ_?WKV|}1&177)wtr$7vkKr>@<@Wy37fj z?FHF7MoREO3?gmbSjEFG(>Ta`;OV}0#dJk&Q&UN6#lX?u7`@N$AB?JbMbj(mD+WTe zPxc2Jfe($b!MlW>0$vbgczA#(CmkK&8p_DX$iOgkiiL%NK}Yca|KtB*OS-oVY#CzE z!5cHJ`80gQy7zHKb=xFnHbJmT3%xz>itmxNz)v~cqB9^bii^9hp^yG-d8m^PH)lJY z_|jt5pOq1egKT?7?}kSYh#Z_OAe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La)!L# zzwYIl&5300UE*yDdq`cJ1?f|F=OJace+@eCmXcR%0V*ffN1VYTHX z*k~dOiFxs*1}c!Stsws6&!@4Y#x@(1+3+MvP`=@T&)=dq}*_U>mNI)ahAT#hyn>2D$<9p@FNKOnP zP4<<>7udWq$8Pgpk$u-RC}$yuRKj{e5Y8*RwD_r4H%O6lJ{&@|%dmCmf%lC9{ejTZ zWyl4dvK?Y)vO9?q1cB7Dmy7BlZym6PkUG_WGqe6dX4b#?V*ey^O(;{isG`MTNCxBy Sa{oU~4&veJMXGlR%lZpK>ugK_ literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py index 524127119..fac89ba39 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py @@ -109,7 +109,7 @@ def checkFilter(self, name, exclusionMask, cameraDistance=15): cmds.modelEditor(activeViewport, edit=True, excludeObjectMask=oldMask) # --- Maya data --- - + # TODO : Construction planes (not working in Hydra as of 2024-05-03) def test_Dimensions(self): @@ -273,7 +273,7 @@ def test_UsdPolygons(self): cmds.refresh() self.checkFilter("polygons_USD", kExcludeMeshes, 10) - + def test_UsdNurbsCurves(self): def createUsdCurve(stagePath): circleName = cmds.circle() @@ -285,5 +285,14 @@ def createUsdCurve(stagePath): self.stackInstances(functools.partial(createUsdCurve, stagePath), 50, [0, 0, 0.005]) self.checkFilter("nurbsCurves_USD", kExcludeNurbsCurves, 2) + def test_UsdNurbsPatches(self): + stagePath = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() + torusName = cmds.torus(sections=20, spans=10, heightRatio=0.5) + mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(torusName[0], long=True)[0], stagePath) + cmds.select(torusName) + cmds.delete() + cmds.select(clear=True) + self.checkFilter("nurbsPatches_USD", kExcludeNurbsSurfaces, 3) + if __name__ == '__main__': fixturesUtils.runTests(globals()) From e6743e0dd3bf48c2e05b6a2cd2828fb4fe5c0732 Mon Sep 17 00:00:00 2001 From: debloip Date: Tue, 15 Oct 2024 16:27:12 -0400 Subject: [PATCH 25/37] HYDRA-1098 : Add filter test with USD data for lights filter --- .../ViewportFiltersTest/lights_USD_excluded.png | Bin 0 -> 1563 bytes .../ViewportFiltersTest/lights_USD_included.png | Bin 0 -> 3889 bytes .../render/mayaToHydra/testViewportFilters.py | 11 +++++++++++ 3 files changed, 11 insertions(+) create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/lights_USD_excluded.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/lights_USD_included.png diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/lights_USD_excluded.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/lights_USD_excluded.png new file mode 100644 index 0000000000000000000000000000000000000000..dbedef32fd8f3b0a32f32b3420710101c9e1097e GIT binary patch literal 1563 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKL9Be?5hW%z|fD~V9glC$sFM}44%>l$9a4C2) zkmSsFb1Me(LBuVsZRZ#mSZ8{=IEGZrd3)87mqAhBz=6jl>*{4Q7RWmpEncvH-OQg1 z53bZ(Gc=e>axio@GE9&drAC8bG!=|ygwe8q#>HXI_W%}?wyzd{fMqrAGM&NG)z4*} HQ$iB}d4q$r literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/lights_USD_included.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/lights_USD_included.png new file mode 100644 index 0000000000000000000000000000000000000000..0455435c717eea9167bc031c272af08e58adfa45 GIT binary patch literal 3889 zcmeHK=Tj5f5>G-T0W>6`2ofL^3lZrhawCKy9Rwi~EJT_GTM&?d1VXbBVl0R#iW)=+ zMS*K*ibydu1?j~^2t}F{5h;0)7vB5){((F1%RIXMbnU?oAJOhi%e3qy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;v zt^~xPwvNy?K0G`=GDI|0s|BV9gKIt6q=CI^vL|of@c|{AZHl!flI9@Pu?}pc^8}OE6GKmlirXLMh^5Q9>m+ z`x$H)YOm_?m?p1@s&NHp)7*zw<`W~A4TDXikI@#T8tW^Qw3H(7Rv@G2Q0``LW+E;t zEfq-;Ye?qJnHLL#Fcz$n(4Iwe)rN5p%&&u?dMsFQsCN; zme+o92cnNL{41q7lid^BhR%i>RBvYgl+_-67NfsRuKeA9aTzbMiOcWR)T@i0F{%6q zR0KocQnXR36h-GNp4UM@@y#nVS%%Ke)qgTzcOy;LEV*uGIPwyMT4U%Q*d7#BC>p><|jn z(dyFHZZrkZJBWWYaKdTn^RG5>9$)%OoYmDt%1l4KFH`Uln!SGk(DRRJ)&D88S92V& btdp!6uUcj Date: Wed, 16 Oct 2024 17:07:02 -0400 Subject: [PATCH 26/37] HYDRA-1098 : Add USD camera filter test --- .../ViewportFiltersTest/cameras_USD_excluded.png | Bin 0 -> 1563 bytes .../ViewportFiltersTest/cameras_USD_included.png | Bin 0 -> 6015 bytes .../render/mayaToHydra/testViewportFilters.py | 11 +++++++++++ test/testUtils/fixturesUtils.py | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/cameras_USD_excluded.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/cameras_USD_included.png diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/cameras_USD_excluded.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/cameras_USD_excluded.png new file mode 100644 index 0000000000000000000000000000000000000000..dbedef32fd8f3b0a32f32b3420710101c9e1097e GIT binary patch literal 1563 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKL9Be?5hW%z|fD~V9glC$sFM}44%>l$9a4C2) zkmSsFb1Me(LBuVsZRZ#mSZ8{=IEGZrd3)87mqAhBz=6jl>*{4Q7RWmpEncvH-OQg1 z53bZ(Gc=e>axio@GE9&drAC8bG!=|ygwe8q#>HXI_W%}?wyzd{fMqrAGM&NG)z4*} HQ$iB}d4q$r literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/cameras_USD_included.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/cameras_USD_included.png new file mode 100644 index 0000000000000000000000000000000000000000..a82b4d776b9acf8df9681259641dbdc76e0b097a GIT binary patch literal 6015 zcmeHLc{~&T|KD7>a^yoQ$8vP6CQXSPt&&N|T{cHz#E^T2F-OQ)%(Z4h zxu=mU2@P{(bN5@{|9}7f9*^JS@qIrY@B8(9Uyt|e@p`?UkIl{C2ZfIc0|0=7H;oJ| z0RUk7-z+G=9l^I~_HZjP)ZLqIrltTew=Kxcf75`~zuZ#jp`l^GfBJumQE=TC06=E% zromO~kQYnidQVm19|Z0h-s_^x#)Zp(-~k6^@RO1WnWe--p!>n+1)i$D`?))`1+D?t{K6`o*lsb)9~|7W-ERrQVz>AKy387~2%t5GPY`gLhY$Y`kO!6s z0D^Ad0qIIGfRQ8!@LEs;VENza|GQ_|8lK>P75Qg(?#g7#-VS(TpG|7n)70lMo&Ib$ z<|Xkjn&4L+WAA-z*&5N0*xjs3yM;G+B`Bp;f;o5YTv&EgUS?|o=MNV|cB?#YJ{8W_ zd6Udfy)-yBA~TXEk-LvOXFin^=$vO1Ygpb|AIR8~K3*8aLo4L>=Rpe44z=^8Ud7AV zi%+l0$W&R`>7R~QkMa{r=N&tv>yr{`kWHthDgFs%&BY2OU&qUtTMtPpWLx$ zvmaT-D5(>DSAhQNNaAJsm+Hi<&H+4k7wC0R8zofv(FxvJ+S8K}O07tButEsYcA$4nH(SITCQR7M`ukxIl z_xzR|1oDTVx`j{o_E?dBuDp!g-MC(%cZKp2k$lFWc!zq}X;*b;-9nqTd5x-6oH6pI;!bYT z94XM=P2bI*8QR+75heQS2GeCJagA=3Fj7xM>`~&yuUrWu5D6MuP)Is($OmUoyg8f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../polygons_DataProducer_excluded.png | Bin 0 -> 1563 bytes .../polygons_DataProducer_included.png | Bin 0 -> 19037 bytes .../render/mayaToHydra/testViewportFilters.py | 12 ++++++++++++ 3 files changed, 12 insertions(+) create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_DataProducer_excluded.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_DataProducer_included.png diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_DataProducer_excluded.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_DataProducer_excluded.png new file mode 100644 index 0000000000000000000000000000000000000000..dbedef32fd8f3b0a32f32b3420710101c9e1097e GIT binary patch literal 1563 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKL9Be?5hW%z|fD~V9glC$sFM}44%>l$9a4C2) zkmSsFb1Me(LBuVsZRZ#mSZ8{=IEGZrd3)87mqAhBz=6jl>*{4Q7RWmpEncvH-OQg1 z53bZ(Gc=e>axio@GE9&drAC8bG!=|ygwe8q#>HXI_W%}?wyzd{fMqrAGM&NG)z4*} HQ$iB}d4q$r literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_DataProducer_included.png b/test/lib/mayaUsd/render/mayaToHydra/ViewportFiltersTest/polygons_DataProducer_included.png new file mode 100644 index 0000000000000000000000000000000000000000..094ca1f827ef79cfe70641d089ea3317d0b31f2e GIT binary patch literal 19037 zcmc$GgPu)f6>ps6v!bpOHgL7X)T?LGTgBySQAie{9@~-X4 z0PsR)YpP+Vqk|&=ye9@8w|}DsNx<`67d17H|Ng&ynii-X!ogv~(NIw`^vT-(WFBp2 zlCseDB(@0|n_1iR-D~-(c*li1fJ^1kI0ovl19}e*PLDvya>|V#C#LBy!kM4D-|KOqM zcyy2RZl)seVKmqO|1X!PC-5Idr#An~WvYF-P=9!~+obR%Cj|TUU^MpTYH2Qt{Gv@F zy5<#i_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NWpZyJW%tmUxewM4OwCtsPZKnMTUcKt zYnKP>1JL)D1o)ZeT~(y0y8kBE*_+<@T2F!4!WkLQ!BnqCBN z>6Ky6a_aVn={~q~sP@i?^Yal`WW+#Ugv@^-w6=EUrv0pI8R`9(Iak<&IJ+UjIT5R* zL?)Nos8oX4^8iH{?N31d@-zomLKw96ex wnvzJm(df;m#}uy*#RiTz__wx6YZVgHN7YnLW+5i9m literal 0 HcmV?d00001 diff --git a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py index bff0631a0..1184c05f8 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py @@ -22,6 +22,8 @@ import testUtils import usdUtils +from testUtils import PluginLoaded + # Note : the order of the bit flags does not correspond to the order # of the options in the "Show" -> "Viewport" UI. kExcludeNurbsCurves = 1 << 0 @@ -316,5 +318,15 @@ def createUsdCamera(stagePath): self.stackInstances(functools.partial(createUsdCamera, stagePath), 50, [0.005, 0, 0]) self.checkFilter("cameras_USD", kExcludeCameras, 3) + # --- 3rd party data producers --- + + def test_DataProducerPolygons(self): + with PluginLoaded('mayaHydraFlowViewportAPILocator'): + locator = cmds.createNode('MhFlowViewportAPILocator') + cmds.setAttr(locator + '.numCubesX', 2) + cmds.setAttr(locator + '.numCubesY', 2) + cmds.setAttr(locator + '.numCubesZ', 2) + self.checkFilter("polygons_DataProducer", kExcludeMeshes, 12) + if __name__ == '__main__': fixturesUtils.runTests(globals()) From e439c699905d7b0008a551f8b5053539707a5ec4 Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 10:33:41 -0400 Subject: [PATCH 28/37] HYDRA-1098 : Cleanup --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp | 10 ---------- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h | 12 +++++------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 6e713f53f..e9a38f428 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -13,22 +13,12 @@ // limitations under the License. // -#include "flowViewport/sceneIndex/fvpPruningSceneIndex.h" #include "fvpPruningSceneIndex.h" #include -#include #include -#include -#include #include -#include -#include #include -#include - -#include -#include PXR_NAMESPACE_OPEN_SCOPE diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index a534d0882..c8b1b67ec 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -22,12 +22,9 @@ #include #include #include -#include -#include -#include +#include #include -#include PXR_NAMESPACE_OPEN_SCOPE @@ -73,6 +70,9 @@ class PruningSceneIndex : FVP_API PXR_NS::SdfPathVector GetChildPrimPaths(const PXR_NS::SdfPath& primPath) const override; + FVP_API + void AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot); + FVP_API bool EnableFilter(const PXR_NS::TfToken& pruningToken); @@ -82,9 +82,7 @@ class PruningSceneIndex : FVP_API std::set GetActiveFilters(); - FVP_API - void AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot); - + // As a workaround until we move to exclusively using PathMappers FVP_API PrimSelections UfePathToPrimSelections(const Ufe::Path& appPath) const override { PXR_NAMESPACE_USING_DIRECTIVE; From e7ddbb8fa2c87b97297f77a2bbd7b14f5d60d658 Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 10:44:51 -0400 Subject: [PATCH 29/37] HYDRA-1098 : Add comments --- .../sceneIndex/fvpPruningSceneIndex.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index e9a38f428..5e1853824 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -137,6 +137,10 @@ bool PruningSceneIndex::_IsAncestorPrunedInclusive(const SdfPath& primPath) cons HdSceneIndexPrim PruningSceneIndex::GetPrim(const SdfPath& primPath) const { if (_filtersByPrunedPath.find(primPath) != _filtersByPrunedPath.end()) { + // Path is pruned out; return nothing. Note that we could also use + // _IsAncestorPrunedInclusive, but child paths of a pruned out prim + // should not be reachable in the first place due to GetChildPrimPaths + // pruning them out as well. return {}; } return GetInputSceneIndex()->GetPrim(primPath); @@ -147,6 +151,7 @@ SdfPathVector PruningSceneIndex::GetChildPrimPaths(const SdfPath& primPath) cons SdfPathVector baseChildPaths = GetInputSceneIndex()->GetChildPrimPaths(primPath); SdfPathVector editedChildPaths; for (const auto& baseChildPath : baseChildPaths) { + // Only keep child paths which are not pruned out. if (_filtersByPrunedPath.find(baseChildPath) == _filtersByPrunedPath.end()) { editedChildPaths.emplace_back(baseChildPath); } @@ -168,10 +173,11 @@ bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) for (const SdfPath& primPath : HdSceneIndexPrimView(GetInputSceneIndex())) { if (_PrunePrim(primPath, GetInputSceneIndex()->GetPrim(primPath), pruningToken)) { + // Only send notification if it was not already pruned out, either directly or indirectly if (!_IsAncestorPrunedInclusive(primPath)) { - // Only send notification if it was not already pruned out, directly or indirectly prunedPrims.emplace_back(primPath); } + _InsertEntry(primPath, pruningToken); } } @@ -195,8 +201,9 @@ bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) SdfPathSet prunedPaths = _prunedPathsByFilter[pruningToken]; for (const auto& primPath : prunedPaths) { _RemoveEntry(primPath, pruningToken); + + // Only send notification if it was pruned and no longer is if (!_IsAncestorPrunedInclusive(primPath)) { - // Only send notification if it was pruned and no longer is unprunedPrims.emplace_back(primPath, GetInputSceneIndex()->GetPrim(primPath).primType); } } @@ -253,6 +260,7 @@ void PruningSceneIndex::_PrimsAdded( } } + // Only send notification if not pruned if (!_IsAncestorPrunedInclusive(addedEntry.primPath)) { editedEntries.emplace_back(addedEntry); } @@ -271,8 +279,14 @@ void PruningSceneIndex::_PrimsRemoved( for (const auto& removedEntry : entries) { if (!_IsAncestorPrunedInclusive(removedEntry.primPath)) { + // Prim was not pruned; forward the notification editedEntries.emplace_back(removedEntry); } else { + // Prim was pruned; we have either already sent a PrimsRemoved + // notification from EnableFilter() or have prevented the original + // PrimsAdded notification from being forwarded in the first place. + // No need to send a PrimsRemoved notification for a prim that + // doesn't exist, just remove the pruning entry. for (const auto& pruningToken : GetActiveFilters()) { _RemoveEntry(removedEntry.primPath, pruningToken); } From bbb43b62ce4b8cdb4e93641ac766a209de33ecb2 Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 10:46:22 -0400 Subject: [PATCH 30/37] HYDRA-1098 : Re-order member variables --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index c8b1b67ec..27eedaee5 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -125,11 +125,11 @@ class PruningSceneIndex : FVP_API bool _IsAncestorPrunedInclusive(const PXR_NS::SdfPath& primPath) const; + std::set _excludedSceneRoots; + // Maps a pruning token to the set of prim paths that have been pruned out by this token std::map _prunedPathsByFilter; std::map> _filtersByPrunedPath; - - std::set _excludedSceneRoots; }; } // namespace FVP_NS_DEF From 4a3dcbdeeda5735ed59cc31160297c2ac96121ee Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 10:49:56 -0400 Subject: [PATCH 31/37] HYDRA-1098 : Make constants const --- lib/mayaHydra/mayaPlugin/renderOverride.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index 2b038187a..3695f0092 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -808,7 +808,7 @@ MStatus MtohRenderOverride::Render( { auto objectExclusions = framecontext->objectTypeExclusions(); - static TfTokenVector polygonFilters = { + static const TfTokenVector polygonFilters = { FvpPruningTokens->meshes, FvpPruningTokens->capsules, FvpPruningTokens->cones, @@ -816,7 +816,7 @@ MStatus MtohRenderOverride::Render( FvpPruningTokens->cylinders, FvpPruningTokens->spheres }; - static std::map mayaFiltersToFvpPruningTokens = { + static const std::map mayaFiltersToFvpPruningTokens = { { MHWRender::MFrameContext::kExcludeMeshes, polygonFilters }, { MHWRender::MFrameContext::kExcludeNurbsCurves, {FvpPruningTokens->nurbsCurves} }, { MHWRender::MFrameContext::kExcludeNurbsSurfaces, {FvpPruningTokens->nurbsPatches} } @@ -1693,6 +1693,11 @@ bool MtohRenderOverride::select( } } + + // for (const auto& hit : outHits) { + // std::cout << hit << std::endl; + // } + //isOneMayaNodeInComponentsPickingMode will be true if one of the picked node is in components picking mode bool isOneMayaNodeInComponentsPickingMode = false; _PopulateSelectionList(outHits, selectInfo, selectionList, worldSpaceHitPts, isOneMayaNodeInComponentsPickingMode); From 27fa44780d6ebb5bcc15cac3043fb9f1ac297c7e Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 10:54:43 -0400 Subject: [PATCH 32/37] HYDRA-1098 : Remove commented debug code --- lib/mayaHydra/mayaPlugin/renderOverride.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index 3695f0092..a316e71f4 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -1693,11 +1693,6 @@ bool MtohRenderOverride::select( } } - - // for (const auto& hit : outHits) { - // std::cout << hit << std::endl; - // } - //isOneMayaNodeInComponentsPickingMode will be true if one of the picked node is in components picking mode bool isOneMayaNodeInComponentsPickingMode = false; _PopulateSelectionList(outHits, selectInfo, selectionList, worldSpaceHitPts, isOneMayaNodeInComponentsPickingMode); From 44d95e7485444297a17aedf62d3ce2007ea5d698 Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 11:07:42 -0400 Subject: [PATCH 33/37] HYDRA-1098 : Use excluded scene root --- lib/mayaHydra/mayaPlugin/renderOverride.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index a316e71f4..ce321f9ea 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -1120,6 +1120,7 @@ void MtohRenderOverride::_InitHydraResources(const MHWRender::MDrawContext& draw //Put BlockPrimRemovalPropagationSceneIndex first as it can block/unblock the prim removal propagation on the whole scene indices chain _blockPrimRemovalPropagationSceneIndex = Fvp::BlockPrimRemovalPropagationSceneIndex::New(_inputSceneIndexOfFilteringSceneIndicesChain); _pruningSceneIndex = Fvp::PruningSceneIndex::New(_blockPrimRemovalPropagationSceneIndex); + _pruningSceneIndex->AddExcludedSceneRoot(MAYA_NATIVE_ROOT); // Maya filtering is handled by VP2/OGS. _selection = std::make_shared(); _selectionSceneIndex = Fvp::SelectionSceneIndex::New(_pruningSceneIndex, _selection); _selectionSceneIndex->SetDisplayName("Flow Viewport Selection Scene Index"); From bd60069378fa769d588e57a00f758776cf6f8686 Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 11:12:34 -0400 Subject: [PATCH 34/37] HYDRA-1098 : Add comments --- lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index 27eedaee5..cba10bd5a 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -70,15 +70,19 @@ class PruningSceneIndex : FVP_API PXR_NS::SdfPathVector GetChildPrimPaths(const PXR_NS::SdfPath& primPath) const override; + // Add a path for which it and all prims under it will not be considered for filtering. FVP_API void AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot); + // Enable a filter and prune out its matching prims FVP_API bool EnableFilter(const PXR_NS::TfToken& pruningToken); + // Disable a filter and re-add its filtered prims FVP_API bool DisableFilter(const PXR_NS::TfToken& pruningToken); + // Returns the tokens corresponding to the currently enabled filters. FVP_API std::set GetActiveFilters(); From acbaefc9da5a5557a6180eba618183ff0742385b Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 11:22:05 -0400 Subject: [PATCH 35/37] HYDRA-1098 : Update tests --- .../render/mayaToHydra/testViewportFilters.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py index 1184c05f8..187bd9fe2 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py @@ -269,19 +269,19 @@ def test_UsdPolygons(self): UsdGeom.Sphere.Define(stage, str(sphereXform.GetPath()) + "/" + sphereName) cmds.select(clear=True) - cmds.polyTorus() + torusName = cmds.polyTorus() cmds.move(3, 0, 3) + mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(torusName[0], long=True)[0], stagePath) + cmds.delete(torusName) cmds.select(clear=True) - cmds.refresh() self.checkFilter("polygons_USD", kExcludeMeshes, 10) def test_UsdNurbsCurves(self): def createUsdCurve(stagePath): circleName = cmds.circle() usdCircleName = mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(circleName[0], long=True)[0], stagePath) - cmds.select(circleName) - cmds.delete() + cmds.delete(circleName) cmds.select(usdCircleName) stagePath = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() self.stackInstances(functools.partial(createUsdCurve, stagePath), 50, [0, 0, 0.005]) @@ -291,8 +291,7 @@ def test_UsdNurbsPatches(self): stagePath = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() torusName = cmds.torus(sections=20, spans=10, heightRatio=0.5) mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(torusName[0], long=True)[0], stagePath) - cmds.select(torusName) - cmds.delete() + cmds.delete(torusName) cmds.select(clear=True) self.checkFilter("nurbsPatches_USD", kExcludeNurbsSurfaces, 3) @@ -300,8 +299,7 @@ def test_UsdLights(self): def createUsdLight(stagePath): lightName = cmds.directionalLight() usdLightName = mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(lightName, long=True)[0], stagePath) - cmds.select(lightName) - cmds.delete() + cmds.delete(lightName) cmds.select(usdLightName) stagePath = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() self.stackInstances(functools.partial(createUsdLight, stagePath), 50, [0.005, 0, 0]) @@ -311,8 +309,7 @@ def test_UsdCameras(self): def createUsdCamera(stagePath): cameraName = cmds.camera() usdCameraName = mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(cameraName[0], long=True)[0], stagePath) - cmds.select(cameraName) - cmds.delete() + cmds.delete(cameraName) cmds.select(usdCameraName) stagePath = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() self.stackInstances(functools.partial(createUsdCamera, stagePath), 50, [0.005, 0, 0]) From b06bc6d37e56dfac95db0f70f17a1922e2e86c7c Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 15:17:45 -0400 Subject: [PATCH 36/37] HYDRA-1098 : Minor refactor from code review --- .../sceneIndex/fvpPruningSceneIndex.cpp | 21 ++++++++++++------- .../sceneIndex/fvpPruningSceneIndex.h | 14 +++++++------ lib/mayaHydra/mayaPlugin/renderOverride.cpp | 6 +----- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp index 5e1853824..783e8fdf3 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.cpp @@ -159,11 +159,20 @@ SdfPathVector PruningSceneIndex::GetChildPrimPaths(const SdfPath& primPath) cons return editedChildPaths; } -bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) +void PruningSceneIndex::SetFilterStatus(const TfToken& pruningToken, bool enabled) +{ + if (enabled) { + _EnableFilter(pruningToken); + } else { + _DisableFilter(pruningToken); + } +} + +void PruningSceneIndex::_EnableFilter(const TfToken& pruningToken) { if (_prunedPathsByFilter.find(pruningToken) != _prunedPathsByFilter.end()) { // Filter already enabled, no change needed. - return false; + return; } // Enable the filter @@ -185,15 +194,13 @@ bool PruningSceneIndex::EnableFilter(const TfToken& pruningToken) if (!prunedPrims.empty()) { _SendPrimsRemoved(prunedPrims); } - - return true; } -bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) +void PruningSceneIndex::_DisableFilter(const TfToken& pruningToken) { if (_prunedPathsByFilter.find(pruningToken) == _prunedPathsByFilter.end()) { // Filter already disabled, no change needed. - return false; + return; } HdSceneIndexObserver::AddedPrimEntries unprunedPrims; @@ -214,8 +221,6 @@ bool PruningSceneIndex::DisableFilter(const TfToken& pruningToken) if (!unprunedPrims.empty()) { _SendPrimsAdded(unprunedPrims); } - - return true; } std::set PruningSceneIndex::GetActiveFilters() diff --git a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h index cba10bd5a..3549959cb 100644 --- a/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h +++ b/lib/flowViewport/sceneIndex/fvpPruningSceneIndex.h @@ -74,13 +74,9 @@ class PruningSceneIndex : FVP_API void AddExcludedSceneRoot(const PXR_NS::SdfPath& sceneRoot); - // Enable a filter and prune out its matching prims + // Enable or disable a filter and send corresponding prim notifications FVP_API - bool EnableFilter(const PXR_NS::TfToken& pruningToken); - - // Disable a filter and re-add its filtered prims - FVP_API - bool DisableFilter(const PXR_NS::TfToken& pruningToken); + void SetFilterStatus(const PXR_NS::TfToken& pruningToken, bool enabled); // Returns the tokens corresponding to the currently enabled filters. FVP_API @@ -113,6 +109,12 @@ class PruningSceneIndex : void _PrimsDirtied( const PXR_NS::HdSceneIndexBase &sender, const PXR_NS::HdSceneIndexObserver::DirtiedPrimEntries &entries) override; + + FVP_API + void _EnableFilter(const PXR_NS::TfToken& pruningToken); + + FVP_API + void _DisableFilter(const PXR_NS::TfToken& pruningToken); FVP_API void _InsertEntry(const PXR_NS::SdfPath& primPath, const PXR_NS::TfToken& pruningToken); diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index ce321f9ea..63efe1361 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -824,11 +824,7 @@ MStatus MtohRenderOverride::Render( for (auto [mayaFilter, fvpPruningTokens] : mayaFiltersToFvpPruningTokens) { for (const auto& fvpPruningToken : fvpPruningTokens) { - if (objectExclusions & mayaFilter) { - _pruningSceneIndex->EnableFilter(fvpPruningToken); - } else { - _pruningSceneIndex->DisableFilter(fvpPruningToken); - } + _pruningSceneIndex->SetFilterStatus(fvpPruningToken, objectExclusions & mayaFilter); } } } From e678d7f657a5d98868a884d09b5d7405dd15bc7e Mon Sep 17 00:00:00 2001 From: debloip Date: Mon, 21 Oct 2024 15:19:06 -0400 Subject: [PATCH 37/37] HYDRA-1098 : Remove superflous selection clears --- test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py index 187bd9fe2..9580dbb97 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testViewportFilters.py @@ -243,38 +243,33 @@ def test_UsdPolygons(self): capsuleXform = UsdGeom.Xform.Define(stage, "/" + capsuleName + "Xform") capsuleXform.AddTranslateOp().Set(value=(6, 0, 0)) UsdGeom.Capsule.Define(stage, str(capsuleXform.GetPath()) + "/" + capsuleName) - cmds.select(clear=True) coneName = "UsdCone" coneXform = UsdGeom.Xform.Define(stage, "/" + coneName + "Xform") coneXform.AddTranslateOp().Set(value=(2, 0, -2)) UsdGeom.Cone.Define(stage, str(coneXform.GetPath()) + "/" + coneName) - cmds.select(clear=True) cubeName = "UsdCube" cubeXform = UsdGeom.Xform.Define(stage, "/" + cubeName + "Xform") cubeXform.AddTranslateOp().Set(value=(-3, 0, -3)) UsdGeom.Cube.Define(stage, str(cubeXform.GetPath()) + "/" + cubeName) - cmds.select(clear=True) cylinderName = "UsdCylinder" cylinderXform = UsdGeom.Xform.Define(stage, "/" + cylinderName + "Xform") cylinderXform.AddTranslateOp().Set(value=(-2, 0, 2)) UsdGeom.Cylinder.Define(stage, str(cylinderXform.GetPath()) + "/" + cylinderName) - cmds.select(clear=True) sphereName = "UsdSphere" sphereXform = UsdGeom.Xform.Define(stage, "/" + sphereName + "Xform") sphereXform.AddTranslateOp().Set(value=(0, 0, 6)) UsdGeom.Sphere.Define(stage, str(sphereXform.GetPath()) + "/" + sphereName) - cmds.select(clear=True) torusName = cmds.polyTorus() cmds.move(3, 0, 3) mayaUsd.lib.PrimUpdaterManager.duplicate(cmds.ls(torusName[0], long=True)[0], stagePath) cmds.delete(torusName) - cmds.select(clear=True) + cmds.select(clear=True) self.checkFilter("polygons_USD", kExcludeMeshes, 10) def test_UsdNurbsCurves(self):