HDK
|
#include <variantSetSpec.h>
Public Member Functions | |
Name | |
SDF_API std::string | GetName () const |
Returns the name of this variant set. More... | |
SDF_API TfToken | GetNameToken () const |
Returns the name of this variant set. More... | |
Namespace hierarchy | |
SDF_API SdfSpecHandle | GetOwner () const |
Returns the prim or variant that this variant set belongs to. More... | |
Variants | |
SDF_API SdfVariantView | GetVariants () const |
Returns the variants as a map. More... | |
SDF_API SdfVariantSpecHandleVector | GetVariantList () const |
Returns the variants as a vector. More... | |
SDF_API void | RemoveVariant (const SdfVariantSpecHandle &variant) |
Public Member Functions inherited from SdfSpec | |
SDF_API SdfSpec & | operator= (const SdfSpec &other) |
SDF_API | ~SdfSpec () |
SDF_API const SdfSchemaBase & | GetSchema () const |
Returns the SdfSchemaBase for the layer that owns this spec. More... | |
SDF_API SdfSpecType | GetSpecType () const |
SDF_API bool | IsDormant () const |
Returns true if this object is invalid or expired. More... | |
SDF_API SdfLayerHandle | GetLayer () const |
Returns the layer that this object belongs to. More... | |
SDF_API SdfPath | GetPath () const |
Returns the scene path of this object. More... | |
SDF_API bool | PermissionToEdit () const |
Returns whether this object's layer can be edited. More... | |
SDF_API std::vector< TfToken > | ListInfoKeys () const |
SDF_API std::vector< TfToken > | GetMetaDataInfoKeys () const |
SDF_API TfToken | GetMetaDataDisplayGroup (TfToken const &key) const |
SDF_API VtValue | GetInfo (const TfToken &key) const |
SDF_API void | SetInfo (const TfToken &key, const VtValue &value) |
SDF_API void | SetInfoDictionaryValue (const TfToken &dictionaryKey, const TfToken &entryKey, const VtValue &value) |
SDF_API bool | HasInfo (const TfToken &key) const |
SDF_API void | ClearInfo (const TfToken &key) |
SDF_API TfType | GetTypeForInfo (const TfToken &key) const |
Returns the data type for the info with the given key. More... | |
SDF_API const VtValue & | GetFallbackForInfo (const TfToken &key) const |
Returns the fallback for the info with the given key. More... | |
SDF_API bool | WriteToStream (std::ostream &, size_t indent=0) const |
Writes this spec to the given stream. More... | |
SDF_API bool | IsInert (bool ignoreChildren=false) const |
SDF_API std::vector< TfToken > | ListFields () const |
Returns all fields with values. More... | |
SDF_API bool | HasField (const TfToken &name) const |
template<class T > | |
bool | HasField (const TfToken &name, T *value) const |
SDF_API VtValue | GetField (const TfToken &name) const |
Returns a field value by name. More... | |
template<typename T > | |
T | GetFieldAs (const TfToken &name, const T &defaultValue=T()) const |
SDF_API bool | SetField (const TfToken &name, const VtValue &value) |
Sets a field value as a boxed VtValue. More... | |
template<typename T > | |
bool | SetField (const TfToken &name, const T &value) |
Sets a field value of type T. More... | |
SDF_API bool | ClearField (const TfToken &name) |
Clears a field. More... | |
SDF_API bool | operator== (const SdfSpec &rhs) const |
SDF_API bool | operator< (const SdfSpec &rhs) const |
Static Public Member Functions | |
Spec construction | |
static SDF_API SdfVariantSetSpecHandle | New (const SdfPrimSpecHandle &prim, const std::string &name) |
Constructs a new instance. More... | |
static SDF_API SdfVariantSetSpecHandle | New (const SdfVariantSpecHandle &prim, const std::string &name) |
Constructs a new instance. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SdfSpec | |
bool | _MoveSpec (const SdfPath &oldPath, const SdfPath &newPath) const |
bool | _DeleteSpec (const SdfPath &path) |
Represents a coherent set of alternate representations for part of a scene.
An SdfPrimSpec object may contain one or more named SdfVariantSetSpec objects that define variations on the prim.
An SdfVariantSetSpec object contains one or more named SdfVariantSpec objects. It may also define the name of one of its variants to be used by default.
When a prim references another prim, the referencing prim may specify one of the variants from each of the variant sets of the target prim. The chosen variant from each set (or the default variant from those sets that the referencing prim does not explicitly specify) is composited over the target prim, and then the referencing prim is composited over the result.
Definition at line 62 of file variantSetSpec.h.
SDF_API std::string SdfVariantSetSpec::GetName | ( | ) | const |
Returns the name of this variant set.
SDF_API SdfSpecHandle SdfVariantSetSpec::GetOwner | ( | ) | const |
Returns the prim or variant that this variant set belongs to.
SDF_API SdfVariantSpecHandleVector SdfVariantSetSpec::GetVariantList | ( | ) | const |
Returns the variants as a vector.
SDF_API SdfVariantView SdfVariantSetSpec::GetVariants | ( | ) | const |
Returns the variants as a map.
|
static |
Constructs a new instance.
|
static |
Constructs a new instance.
Removes variant
from the list of variants.
If the variant set does not currently own variant
, no action is taken.