-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug where adding an empty sublayer to a layer stack
could cause errors and incorrect results with value clips. Usd_Clip and Usd_ClipSet previously stored the index of the layer in the layer stack where the clip set was authored. When a non-empty sublayer was added to the layer stack, UsdStage would end up resync'ing prims, which would ultimately recompute the clip sets and update that index. However, when an empty sublayer was added, this resync would not occur and the index would be invalidated if the sublayer was added before that position in the layer stack. Once in this state, UsdStage would incorrectly identify the layer where the value clips were authored. This could lead to issues including errors opening value clips specified via relative asset paths and incorrect results when looking at an attribute's property stack. This fix modifies the objects to store the handle of the layer where the clip set was authored instead of the index, avoiding the need to update that index on any sublayer changes. Fixes #2014 (Internal change: 2256833)
- Loading branch information
Showing
13 changed files
with
161 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
pxr/usd/usd/testenv/testUsdValueClips/sublayerChanges/layers/clip.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#usda 1.0 | ||
|
||
def "Model" | ||
{ | ||
float attr_1.timeSamples = { | ||
0: 10, | ||
} | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
pxr/usd/usd/testenv/testUsdValueClips/sublayerChanges/layers/clip_manifest.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#usda 1.0 | ||
|
||
def "Model" | ||
{ | ||
float attr_1 | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
pxr/usd/usd/testenv/testUsdValueClips/sublayerChanges/layers/ref.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#usda 1.0 | ||
|
||
def "Model" | ||
{ | ||
float attr_1 = 1 | ||
} | ||
|
19 changes: 19 additions & 0 deletions
19
pxr/usd/usd/testenv/testUsdValueClips/sublayerChanges/layers/sublayer.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#usda 1.0 | ||
|
||
over "SingleClip" ( | ||
clips = { | ||
dictionary default = { | ||
double2[] active = [(0, 0)] | ||
asset[] assetPaths = [@./clip.usda@] | ||
asset manifestAssetPath = @./clip_manifest.usda@ | ||
string primPath = "/Model" | ||
} | ||
} | ||
references = @./ref.usda@</Model> | ||
) | ||
{ | ||
float attr_1.timeSamples = { | ||
0: 100, | ||
} | ||
} | ||
|
6 changes: 6 additions & 0 deletions
6
pxr/usd/usd/testenv/testUsdValueClips/sublayerChanges/root.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#usda 1.0 | ||
( | ||
subLayers = [ | ||
@./layers/sublayer.usda@ | ||
] | ||
) |