-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Hi,
We are encountering an issue in MayaHydra where prims from a previous USD source are not removed when the source file of a USD node is changed, resulting in overlapping geometry from the old and new stages in the viewport.
We get the following call sequence :
void UsdImagingStageSceneIndex::SetStage(UsdStageRefPtr stage)was called with a null stage.UsdImagingStageSceneIndex::_SendPrimsRemoved({SdfPath::AbsoluteRootPath()});was called to remove all prims.void HdMergingSceneIndex::_PrimsRemoved(const HdSceneIndexBase &sender, const HdSceneIndexObserver::RemovedPrimEntries &entries)was called and forwarded the removal byHowever, after the removal propagation,OpenUSD/pxr/imaging/hd/mergingSceneIndex.cpp
Line 560 in d8db3b4
_SendPrimsRemoved(entries); is called, which re-adds all previously removed prims.OpenUSD/pxr/imaging/hd/mergingSceneIndex.cpp
Line 561 in d8db3b4
_SendPrimsAdded(addedEntries);
This causes the prims from the old USD source remain active alongside prims from the new source, causing overlapping objects in the Hydra viewport. The stale prims are only cleared when the Hydra viewport is fully destroyed and recreated (for example, by switching viewports).
By reverting commit b4112c7, the problem goes away. We believe this might be similar to issue #3563 .
Thank you.