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

#include <variantSets.h>

Public Member Functions

USD_API UsdVariantSet AddVariantSet (const std::string &variantSetName, UsdListPosition position=UsdListPositionBackOfPrependList)
USD_API bool GetNames (std::vector< std::string > *names) const
USD_API std::vector< std::stringGetNames () 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
USD_API bool HasVariantSet (const std::string &variantSetName) const
USD_API std::string GetVariantSelection (const std::string &variantSetName) const
USD_API bool SetSelection (const std::string &variantSetName, const std::string &variantName)
USD_API SdfVariantSelectionMap GetAllVariantSelections () const


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 UsdVariantSets::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 UsdVariantSets::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 UsdVariantSets::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> UsdVariantSets::GetNames ( ) const

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

USD_API std::string UsdVariantSets::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 UsdVariantSets::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 UsdVariantSets::HasVariantSet ( const std::string variantSetName) const

Returns true if a VariantSet named variantSetName exists on the originating prim.

UsdVariantSet UsdVariantSets::operator[] ( const std::string variantSetName) const

Definition at line 252 of file variantSets.h.

USD_API bool UsdVariantSets::SetSelection ( const std::string variantSetName,
const std::string variantName 

Friends And Related Function Documentation

friend class UsdPrim

Definition at line 293 of file variantSets.h.

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