A Stage is an instance of the USD data model that holds the entire scene graph and associated data. It serves as the entry point for accessing and manipulating the contents of a USD file or composition. A Stage provides an interface to load, edit, and save USD data, allowing pipeline engineers, artists, and developers to work with the scene data efficiently.
When you create or open a USD file using OpenUSD, you typically create a Stage object to represent that file. The Stage object acts as a container that holds prims, which are the individual objects within the scene hierarchy. Prims encapsulate data and relationships, and they collectively form the scene graph.
The Stage object provides a range of functionalities for working with the scene data, including:
Loading and Saving
The Stage allows you to load USD files from disk, read the scene data, and save changes back to disk. It provides methods for efficient loading and streaming of data, allowing you to work with large and complex scenes.
Accessing Prims and Attributes
The Stage provides methods to access and manipulate prims and their attributes within the scene. You can query and modify the properties of prims, such as position, rotation, scale, and other attributes associated with them.
Scene Graph Traversal
The Stage enables traversing the scene graph to navigate between prims and their relationships. You can iterate through child prims, access parent prims, and traverse the hierarchy to find specific prims of interest.
Editing and Composition
The Stage allows you to make changes to the scene, including creating, modifying, and removing prims and their attributes. It supports composition, which means you can reference, layer, and blend multiple USD files to create complex scenes and variations.
Overall, the Stage object in OpenUSD serves as the central component for working with the scene data. It provides a powerful and flexible interface to interact with the scene graph, load and save USD files, access and modify prims and their attributes, traverse the hierarchy, and perform operations required for building and manipulating complex scenes.