Each entry in the dictionary defines a single field and has the following syntax: Plugin metadata fields must be defined in a dictionary called "SdfMetadata" in the "Info" section of the plugin's plugInfo.json file. This data will be serialized to and read from layers just like all other scene description. Consumers can query and author data for these fields in the same way as the built-in metadata fields in Sdf. Plugins can extend scene description to store additional plugin-specific metadata by registering custom metadata fields. Represents a relationship to other prims, attributes, or relationships, such as the material:binding relationship that assigns Materials to Gprims. For example, the radius attribute of a Sphere gprim holds a scalar value the points attribute of a Mesh gprim holds an array value. Represents values, which can be scalar or array-valued. The SdfPropertySpec subclasses represent the basic types of properties that prims can have: Property specs also represent partial scene description. SdfPrimSpec properties are represented by the SdfPropertySpec class. Similarly, the list of name children on an SdfPrimSpec object may be sparse. An SdfPrimSpec object that describes a Cylinder may have a radius but no height, relying on either another SdfPrimSpec object or the prim's fallback definition to provide the height. In addition, the list of properties that an SdfPrimSpec object owns may be sparse. It does not require values for every property it contains. An SdfPrimSpec object represents a partial description of an individual prim in a scene.
There are many different kinds of prims, but at the level of scene description they are all represented by an SdfPrimSpec object. For example, the SdfPrimSpec and SdfPropertySpec classes have an access permission property (SdfPermission) that you can use to specify whether a layer is public or private. Several properties at the layer level determine how or whether the opinion offered at a particular layer is considered when the system composes a complete prim on a stage. You can think of the partial scene spec in an SdfLayer object as one opinion on an aspect of a complete scene.
Per scene volume plugin full#
The full description of the prim in a given scene comes only from combining or composing the contributions of each of the SdfPrimSpec objects. Note that layering and referencing means that multiple SdfPrimSpec objects may contribute partial descriptions for the same logical prim. When referencing, a prim and its name children merge over the other prim that it references. An SdfPrimSpec object can also reference another prim within its own layer or a prim from another layer. When layering, the SdfPrimSpec objects in an SdfLayer object merge over the prims at the same namespace path in the layer. For example, SdfPath assigns unique paths for each of the objects in a namespace hierarchy this includes paths to scene description that "lives inside of" particular variants of a VariantSet. The SdfPath class provides methods to manipulate paths for all of the objects that comprise a layer's scene description. Each layer contains one or more root prims, each of which may have a hierarchy of children. SdfLayer objects do not have the context to know how they relate to other layers.Īn SdfPrimSpec object is named and forms a namespace hierarchy with other prims. For example, the UsdStage object has the context to know how the path of a UsdPrim object on the stage relates to the paths of each SdfPrimSpec object in each layer that contributes a partial description to the complete prim. The UsdStage object not only represents a complete scene it also knows how each of the partial scene descriptions were combined to form the complete scene. You should primarily work with scene description using the classes in the Usd library. Other features abstracted at the layer level include undo/redo functionality and logging, which can be customized by subclassing SdfLayerStateDelegateBase. usd format (one layer per file, ascii or binary). Use methods on an SdfLayer object to export and save a layer to a file, or to load a file from disk. (For an overview of prims and stages, see the Usd library overview.) A complete UsdPrim on a stage is a composition of the prim's built-in fallback values and all of the prim spec objects specified in Sdf layers. The primary unit of scene description within a layer is a prim spec, represented by the SdfPrimSpec class. In USD, a complete scene description is composed from partial scene description stored in SdfLayer objects. Implements scene description layers in USD. It also provides the primitive abstractions for interacting with scene description, such as SdfPath, SdfLayer, SdfPrimSpec. Sdf provides the foundations for serializing scene description to a reference ascii format, or a (multitude of) plugin-defined format.