Skip to content

Commit

Permalink
USD: Add a test case to confirm that value blocks will
Browse files Browse the repository at this point in the history
also block time samples.

(Internal change: 2034494)
  • Loading branch information
blevin authored and pixar-oss committed Jan 29, 2020
1 parent 85090d0 commit eb0914b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pxr/usd/usd/testenv/testUsdFlattenLayerStack.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ def replaceWithFoo(layer, s):
b = prim.GetAttribute('b')
self.assertEqual(b.Get(), None)

# a value block will block both defaults and time samples
c = prim.GetAttribute('c')
self.assertEqual(c.Get(), None)
self.assertEqual(c.Get(1), None)

# strong time samples will override a weaker value block
d = prim.GetAttribute('d')
self.assertEqual(d.Get(1), 789)

if __name__=="__main__":
# Register test plugin defining timecode metadata fields.
testDir = os.path.abspath(os.getcwd())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ over "Human"
{
int[] a = [1]
int[] b = None
int c = None
int d.timeSamples = {
0: 456,
1: 789
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ def Xform "Human" (
{
int[] a = None
int[] b = [1]
int c = 123
int c.timeSamples = {
0: 456,
1: 789
}
int d = None
}

0 comments on commit eb0914b

Please sign in to comment.