Skip to content

Commit

Permalink
pcp: Fix test when incremental changes for layer ops are disabled
Browse files Browse the repository at this point in the history
When incremental changes are disabled, sublayer muting and
removal result in a full resync.

(Internal change: 2345744)
  • Loading branch information
sunyab authored and pixar-oss committed Oct 25, 2024
1 parent d431829 commit 238f0b7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pxr/usd/pcp/testenv/testPcpChanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,15 @@ def _FindPrimIndex(indexAndPath):
self.assertFalse(_FindPrimIndex(overAndDefInSublayers))
self.assertFalse(_FindPrimIndex(overInRootDefInSublayer))

# This prim index does not need to be recomputed, it just has an
# updated prim stack.
self.assertTrue(_FindPrimIndex(overInSublayerAndRoot))
self.assertEqual(
overInSublayerAndRoot[0].primStack,
[rootLayer.GetPrimAtPath('/Parent/OverInSublayerAndRoot')])
if INCREMENTAL_CHANGES:
# This prim index does not need to be recomputed, it just has an
# updated prim stack.
self.assertTrue(_FindPrimIndex(overInSublayerAndRoot))
self.assertEqual(
overInSublayerAndRoot[0].primStack,
[rootLayer.GetPrimAtPath('/Parent/OverInSublayerAndRoot')])
else:
self.assertFalse(_FindPrimIndex(overInSublayerAndRoot))

# Test cases for muting a sublayer that itself has sublayers.
def _MuteSublayer(pcp):
Expand Down

0 comments on commit 238f0b7

Please sign in to comment.