|
UsdVariantSets represents the collection of VariantSets that are present on a UsdPrim. More...
#include <variantSets.h>
Public Member Functions | |
USD_API UsdVariantSet | AddVariantSet (const std::string &variantSetName, UsdListPosition position=UsdListPositionBackOfPrependList) |
Find an existing, or create a new VariantSet on the originating UsdPrim, named variantSetName . | |
USD_API bool | GetNames (std::vector< std::string > *names) const |
Compute the list of all VariantSets authored on the originating UsdPrim. | |
USD_API std::vector< std::string > | GetNames () const |
Return a list of all VariantSets authored on the originating UsdPrim. | |
UsdVariantSet | operator[] (const std::string &variantSetName) const |
USD_API UsdVariantSet | GetVariantSet (const std::string &variantSetName) const |
Return a UsdVariantSet object for variantSetName . | |
USD_API bool | HasVariantSet (const std::string &variantSetName) const |
Returns true if a VariantSet named variantSetName exists on the originating prim. | |
USD_API std::string | GetVariantSelection (const std::string &variantSetName) const |
Return the composed variant selection for the VariantSet named variantSetName. | |
USD_API bool | SetSelection (const std::string &variantSetName, const std::string &variantName) |
USD_API SdfVariantSelectionMap | GetAllVariantSelections () const |
Returns the composed map of all variant selections authored on the the originating UsdPrim, regardless of whether a corresponding variant set exists. | |
Friends | |
class | UsdPrim |
UsdVariantSets represents the collection of VariantSets that are present on a UsdPrim.
A UsdVariantSets object, retrieved from a prim via UsdPrim::GetVariantSets(), provides the API for interrogating and modifying the composed list of VariantSets active defined on the prim, and also the facility for authoring a VariantSet selection for any of those VariantSets.
Definition at line 205 of file variantSets.h.
USD_API UsdVariantSet AddVariantSet | ( | const std::string & | variantSetName, |
UsdListPosition | position = UsdListPositionBackOfPrependList |
||
) |
Find an existing, or create a new VariantSet on the originating UsdPrim, named variantSetName
.
This step is not always necessary, because if this UsdVariantSets object is valid, then
will always succeed, creating the VariantSet first, if necessary. This method exists for situations in which you want to create a VariantSet without necessarily populating it with variants.
USD_API SdfVariantSelectionMap GetAllVariantSelections | ( | ) | const |
Returns the composed map of all variant selections authored on the the originating UsdPrim, regardless of whether a corresponding variant set exists.
USD_API std::vector< std::string > GetNames | ( | ) | const |
Return a list of all VariantSets authored on the originating UsdPrim.
USD_API bool GetNames | ( | std::vector< std::string > * | names | ) | const |
Compute the list of all VariantSets authored on the originating UsdPrim.
Always return true. Clear the contents of names
and store the result there.
USD_API std::string GetVariantSelection | ( | const std::string & | variantSetName | ) | const |
Return the composed variant selection for the VariantSet named variantSetName.
If there is no selection, (or variantSetName
does not exist) return the empty string.
USD_API UsdVariantSet GetVariantSet | ( | const std::string & | variantSetName | ) | const |
Return a UsdVariantSet object for variantSetName
.
This always succeeds, although the returned VariantSet will be invalid if the originating prim is invalid
USD_API bool HasVariantSet | ( | const std::string & | variantSetName | ) | const |
Returns true if a VariantSet named variantSetName
exists on the originating prim.
|
inline |
Definition at line 235 of file variantSets.h.
|
friend |
Definition at line 276 of file variantSets.h.