Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[usdImaging] Preserved excludes paths on prim resync #1949

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pxr/usdImaging/usdImaging/delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,11 @@ UsdImagingDelegate::_ResyncUsdPrim(SdfPath const& usdPath,
TF_DEBUG(USDIMAGING_CHANGES).Msg(" (repopulating from root)\n");
proxy->Repopulate(usdPath);
} else {
// Build a TfHashSet of excluded prims for fast rejection.
TfHashSet<SdfPath, SdfPath::Hash> excludedSet;
TF_FOR_ALL(pathIt, _excludedPrimPaths) {
excludedSet.insert(*pathIt);
}
// If we resynced prims individually, walk the subtree for new prims
UsdPrimRange range(_stage->GetPrimAtPath(usdPath),
_GetDisplayPredicate());
Expand All @@ -1342,6 +1347,13 @@ UsdImagingDelegate::_ResyncUsdPrim(SdfPath const& usdPath,
iter.PruneChildren();
continue;
}
if (excludedSet.find(iter->GetPath()) != excludedSet.end()) {
iter.PruneChildren();
TF_DEBUG(USDIMAGING_CHANGES).Msg("[Resync Prim] Pruned at <%s> "
"due to exclusion list\n",
iter->GetPath().GetText());
continue;
}
// Check if this prim (& subtree) should be pruned based on
// prim type.
if (UsdImagingPrimAdapter::ShouldCullSubtree(*iter)) {
Expand Down