-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formalizing the behavior for using anonymous layer identifiers for fi…
…le formats that dynamically generate layer content without a readable resolved asset. A file format now needs to specify that it can call Read to populate data from an anonymous layer identifier by overriding _ShouldReadAnonymousLayers to return true. Now the following behaviors exist for layers with formats that ShouldReadAnonymousLayers: 1. FindOrOpen will now attempt to open and read anonymous layers of these formats when it can't find the layer in the registry. This had already worked for file formats that could successfully call Read on anonymous layers but it wasn't formalized as to which formats were expected to be able to do this. 2. Layer Reload will now repopulate the layer content through calling Read for anonymous layers when the file format supports it. Previously all anonymous layers whose file formats support anonymous reload would always clear the entire contents of the layer (as if it were muted). This now makes sure the reloaded anonymous layer will have same contents as when it is first opened. Added a test case to testSdfLayer to verify our assumptions about how the functions above should work. Udpated the usdDancingCubesExample to move the data population from file format args out of the InitData and into Read where it belongs. This provides the correct layer muting behavior. Also updates the dancing cubes example to payload an anonymous layer instead of an empty placeholder file. Fixes #1356 (Internal change: 2162134) (Internal change: 2162166)
- Loading branch information
Showing
19 changed files
with
482 additions
and
92 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
2 changes: 0 additions & 2 deletions
2
extras/usd/examples/usdDancingCubesExample/empty.usddancingcubesexample
This file was deleted.
Oops, something went wrong.
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
2 changes: 0 additions & 2 deletions
2
...es/usdDancingCubesExample/testenv/testUsdDancingCubesExample/empty.usddancingcubesexample
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.