All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdVariantSets Class Reference

UsdVariantSets represents the collection of VariantSets that are present on a UsdPrim. More...

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. More...
 
USD_API bool GetNames (std::vector< std::string > *names) const
 Compute the list of all VariantSets authored on the originating UsdPrim. More...
 
USD_API std::vector< std::string > GetNames () const
 Return a list of all VariantSets authored on the originating UsdPrim. More...
 
UsdVariantSet operator[] (const std::string &variantSetName) const
 
USD_API UsdVariantSet GetVariantSet (const std::string &variantSetName) const
 Return a UsdVariantSet object for variantSetName. More...
 
USD_API bool HasVariantSet (const std::string &variantSetName) const
 Returns true if a VariantSet named variantSetName exists on the originating prim. More...
 
USD_API std::string GetVariantSelection (const std::string &variantSetName) const
 Return the composed variant selection for the VariantSet named variantSetName. More...
 
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. More...
 

Friends

class UsdPrim
 

Detailed Description

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 222 of file variantSets.h.

Member Function Documentation

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

* varSetsObj.GetVariantSet(variantSetName).AddVariant(variantName);
*

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 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::vector<std::string> GetNames ( ) const

Return a list of all VariantSets authored on the originating UsdPrim.

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.


The documentation for this class was generated from the following file: