Skip to content

Commit 2af4df0

Browse files
authored
Merge pull request #1306 from johnhaddon/usdReadSetCancellation
USDScene : Improve responsiveness of `readSet()` cancellation
2 parents 1be8465 + de2eccf commit 2af4df0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/IECoreUSD/src/IECoreUSD/USDScene.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,15 @@ IECore::PathMatcher readSetInternal( const pxr::UsdPrim &prim, const pxr::TfToke
269269
const size_t prefixSize = prim.GetPath().GetPathElementCount();
270270
if( auto collection = pxr::UsdCollectionAPI( prim, name ) )
271271
{
272+
Canceller::check( canceller );
272273
pxr::UsdCollectionAPI::MembershipQuery membershipQuery = collection.ComputeMembershipQuery();
274+
275+
Canceller::check( canceller );
273276
pxr::SdfPathSet includedPaths = collection.ComputeIncludedPaths( membershipQuery, prim.GetStage() );
274277

275278
for( const auto &path : includedPaths )
276279
{
280+
Canceller::check( canceller );
277281
if( path.HasPrefix( prim.GetPath() ) )
278282
{
279283
result.addPath( fromUSDWithoutPrefix( path, prefixSize ) );

0 commit comments

Comments
 (0)