diff --git a/lib/flowViewport/API/samples/fvpFilteringSceneIndexExample.cpp b/lib/flowViewport/API/samples/fvpFilteringSceneIndexExample.cpp index 43d769f6bf..2845c6a047 100644 --- a/lib/flowViewport/API/samples/fvpFilteringSceneIndexExample.cpp +++ b/lib/flowViewport/API/samples/fvpFilteringSceneIndexExample.cpp @@ -108,7 +108,14 @@ SdfPathVector FilteringSceneIndexExample::GetChildPrimPaths(const SdfPath& primP return SdfPathVector(); } - return IsFiltered(primPath) ? SdfPathVector() : _GetInputSceneIndex()->GetChildPrimPaths(primPath); + SdfPathVector childPaths = _GetInputSceneIndex()->GetChildPrimPaths(primPath); + childPaths.erase( + std::remove_if( + childPaths.begin(), + childPaths.end(), + [this](const SdfPath& childPath) -> bool { return IsFiltered(childPath); }), + childPaths.end()); + return IsFiltered(primPath) ? SdfPathVector() : childPaths; } void FilteringSceneIndexExample::_PrimsAdded(