From 238f0b7732061ffdd1d11693f7118e814753d946 Mon Sep 17 00:00:00 2001 From: sunyab Date: Fri, 25 Oct 2024 11:12:47 -0700 Subject: [PATCH] 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) --- pxr/usd/pcp/testenv/testPcpChanges.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pxr/usd/pcp/testenv/testPcpChanges.py b/pxr/usd/pcp/testenv/testPcpChanges.py index c036edfc91..2d9550d02c 100644 --- a/pxr/usd/pcp/testenv/testPcpChanges.py +++ b/pxr/usd/pcp/testenv/testPcpChanges.py @@ -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):