Expand description
Sdf provides the foundations for serializing scene description to a reference ascii format, or a (multitude of) plugin-defined format. It also provides the primitive abstractions for interacting with scene description, such as SdfPath, SdfLayer, SdfPrimSpec.
Overview
Implements scene description layers in USD. In USD, a complete scene description is composed from partial scene description stored in SdfLayer objects. The primary unit of scene description within a layer is a prim spec, represented by the SdfPrimSpec class. 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. (For an overview of prims and stages, see the “Usd library overview”.)
Use methods on an SdfLayer object to export and save a layer to a file, or to load a file from disk. Scene description files are stored in ‘.usd’ format (one layer per file, ascii or binary). Other features abstracted at the layer level include undo/redo functionality and logging, which can be customized by subclassing SdfLayerStateDelegateBase .
You should primarily work with scene description using the classes in the Usd library. 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. 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. SdfLayer objects do not have the context to know how they relate to other layers.
Structs
- Contains an asset path and an optional resolved path. Asset paths may contain non-control UTF-8 encoded characters. Specifically, U+0000..U+001F (C0 controls), U+007F (delete), and U+0080..U+009F (C1 controls) are disallowed. Attempts to construct asset paths with such characters will issue a TfError and produce the default-constructed empty asset path.
- This is a reference to an AssetPath.
- A scene description container that can combine with other such containers to form simple component assets, and successively larger aggregates. The contents of an SdfLayer adhere to the SdfData data model. A layer can be ephemeral, or be an asset accessed and serialized through the ArAsset and ArResolver interfaces.
- A contiguous block of LayerHandle s.
- A path value used to locate objects in layers or scenegraphs.
- Iterates over an PathVector
- This is a reference to the underlying SdfPathVector
- Provides information about the various scene description fields.
- Value type that represents a time code. It’s equivalent to a double type value but is used to indicate that this value should be resolved by any time based value resolution.
- Represents a value type name, i.e. an attribute’s type name. Usually, a value type name associates a string with a tf.Type and an optional role, along with additional metadata. A schema registers all known value type names and may register multiple names for the same TfType and role pair. All name strings for a given pair are collectively called its aliases.