From 168d09f6658b5ad5a9e426cc9167d8d8a10256fd Mon Sep 17 00:00:00 2001 From: David Lanier Date: Wed, 24 Jan 2024 14:33:32 +0100 Subject: [PATCH] fix a bug found by flowviewportAPI tests. --- .../interfacesImp/fvpDataProducerSceneIndexInterfaceImp.cpp | 6 ------ .../interfacesImp/fvpDataProducerSceneIndexInterfaceImp.h | 2 -- lib/mayaHydra/mayaPlugin/renderOverride.cpp | 3 --- 3 files changed, 11 deletions(-) diff --git a/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.cpp b/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.cpp index 9407d691e0..ba01aee18e 100644 --- a/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.cpp +++ b/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.cpp @@ -272,10 +272,4 @@ void DataProducerSceneIndexInterfaceImp::setSceneIndexDataFactory(DataProducerSc sceneIndexDataFactory = &factory; } -void DataProducerSceneIndexInterfaceImp::ClearDataProducerSceneIndicesThatApplyToAllViewports() -{ - std::lock_guard lockDataProducerSceneIndicesDataPerViewport(dataProducerSceneIndicesThatApplyToAllViewports_mutex); - dataProducerSceneIndicesThatApplyToAllViewports.clear(); -} - } //End of namespace FVP_NS_DEF diff --git a/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.h b/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.h index c92ca4a2e9..2a0f72e876 100644 --- a/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.h +++ b/lib/flowViewport/API/interfacesImp/fvpDataProducerSceneIndexInterfaceImp.h @@ -68,8 +68,6 @@ class DataProducerSceneIndexInterfaceImp : public DataProducerSceneIndexInterfac const std::string& hydraViewportId = PXR_NS::FvpViewportAPITokens->allViewports)override; - FVP_API void ClearDataProducerSceneIndicesThatApplyToAllViewports(); - //Called by flow viewport ///hydraViewportSceneIndexAdded is called when a new hydra viewport is created by the ViewportInformationAndSceneIndicesPerViewportDataManager, it's not a callback. void hydraViewportSceneIndexAdded(const InformationInterface::ViewportInformation& viewportInfo); diff --git a/lib/mayaHydra/mayaPlugin/renderOverride.cpp b/lib/mayaHydra/mayaPlugin/renderOverride.cpp index 0d90aba83d..7c54100ac0 100644 --- a/lib/mayaHydra/mayaPlugin/renderOverride.cpp +++ b/lib/mayaHydra/mayaPlugin/renderOverride.cpp @@ -820,9 +820,6 @@ void MtohRenderOverride::ClearHydraResources() //We don't have any viewport using Hydra any more Fvp::ViewportInformationAndSceneIndicesPerViewportDataManager::Get().RemoveAllViewportsInformation(); - //Remove the data producer scene indices that apply to all viewports - Fvp::DataProducerSceneIndexInterfaceImp::get().ClearDataProducerSceneIndicesThatApplyToAllViewports(); - _mayaHydraSceneProducer.reset(); _selectionSceneIndex.Reset(); _selection.reset();