Skip to content

Commit 238f0b7

Browse files
sunyabpixar-oss
authored andcommitted
pcp: Fix test when incremental changes for layer ops are disabled
When incremental changes are disabled, sublayer muting and removal result in a full resync. (Internal change: 2345744)
1 parent d431829 commit 238f0b7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pxr/usd/pcp/testenv/testPcpChanges.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,12 +1110,15 @@ def _FindPrimIndex(indexAndPath):
11101110
self.assertFalse(_FindPrimIndex(overAndDefInSublayers))
11111111
self.assertFalse(_FindPrimIndex(overInRootDefInSublayer))
11121112

1113-
# This prim index does not need to be recomputed, it just has an
1114-
# updated prim stack.
1115-
self.assertTrue(_FindPrimIndex(overInSublayerAndRoot))
1116-
self.assertEqual(
1117-
overInSublayerAndRoot[0].primStack,
1118-
[rootLayer.GetPrimAtPath('/Parent/OverInSublayerAndRoot')])
1113+
if INCREMENTAL_CHANGES:
1114+
# This prim index does not need to be recomputed, it just has an
1115+
# updated prim stack.
1116+
self.assertTrue(_FindPrimIndex(overInSublayerAndRoot))
1117+
self.assertEqual(
1118+
overInSublayerAndRoot[0].primStack,
1119+
[rootLayer.GetPrimAtPath('/Parent/OverInSublayerAndRoot')])
1120+
else:
1121+
self.assertFalse(_FindPrimIndex(overInSublayerAndRoot))
11191122

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

0 commit comments

Comments
 (0)