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

#include <attributeHints.h>

+ Inheritance diagram for UsdUIAttributeHints:

Public Member Functions

USDUI_API UsdUIAttributeHints ()
 
USDUI_API UsdUIAttributeHints (const UsdAttribute &attr)
 Construct a hints object for the given UsdAttribute attr. More...
 
UsdAttribute GetAttribute () const
 Return the attribute that this hints instance is interpreting. More...
 
USDUI_API VtDictionary GetValueLabels () const
 
USDUI_API bool SetValueLabels (const VtDictionary &labels)
 
USDUI_API VtTokenArray GetValueLabelsOrder () const
 
USDUI_API bool SetValueLabelsOrder (const VtTokenArray &order)
 Set the attribute's value labels order. Return true if successful. More...
 
USDUI_API bool ApplyValueLabel (const std::string &label)
 
- Public Member Functions inherited from UsdUIPropertyHints
USDUI_API UsdUIPropertyHints ()
 
USDUI_API UsdUIPropertyHints (const UsdProperty &prop)
 Construct a hints object for the given UsdProperty prop. More...
 
UsdProperty GetProperty () const
 Return the property that this hints instance is interpreting. More...
 
USDUI_API std::string GetDisplayGroup () const
 
USDUI_API bool SetDisplayGroup (const std::string &group)
 
USDUI_API std::string GetShownIf () const
 
USDUI_API bool SetShownIf (const std::string &shownIf)
 
- Public Member Functions inherited from UsdUIObjectHints
USDUI_API UsdUIObjectHints ()
 
USDUI_API UsdUIObjectHints (const UsdObject &obj)
 Construct a hints object for the given UsdObject obj. More...
 
UsdObject GetObject () const
 Return the object that this hints intance is interpreting. More...
 
USDUI_API std::string GetDisplayName () const
 
USDUI_API bool SetDisplayName (const std::string &name)
 
USDUI_API bool GetHidden () const
 
USDUI_API bool SetHidden (bool hidden)
 
 operator bool () const
 Return true if this hints object is valid. More...
 
bool operator== (const UsdUIObjectHints &rhs) const
 Equality operator. More...
 
bool operator!= (const UsdUIObjectHints &rhs) const
 Inequality operator. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from UsdUIObjectHints
static USDUI_API TfToken _MakeKeyPath (const TfToken &key1, const TfToken &key2)
 

Detailed Description

A "schema-like" wrapper that provides API for retrieving and authoring UI hint values within the uiHints dictionary field on a UsdAttribute instance.

UsdUIAttributeHints is "schema-like" in that it interprets fields belonging to a core object type (in this case UsdAttribute, but see also UsdUIObjectHints, UsdUIPrimHints, and UsdUIPropertyHints), and provides convenient API for using those fields. However, it is not formally a schema and does not derive from UsdSchemaBase.

See usdUI_hintsOverview for an overview of UI hints.

Definition at line 34 of file attributeHints.h.

Constructor & Destructor Documentation

USDUI_API UsdUIAttributeHints::UsdUIAttributeHints ( )

Default constructor that creates an invalid hints object.

Calling "set" operations on this object will post errors. "Get" operations will return fallback values.

USDUI_API UsdUIAttributeHints::UsdUIAttributeHints ( const UsdAttribute attr)
explicit

Construct a hints object for the given UsdAttribute attr.

Member Function Documentation

USDUI_API bool UsdUIAttributeHints::ApplyValueLabel ( const std::string &  label)

Author the value associated with the given label to the attribute. If label is not a key in the attribute's value labels dictionary, return false. Otherwise return true if label was successfully applied.

UsdAttribute UsdUIAttributeHints::GetAttribute ( ) const
inline

Return the attribute that this hints instance is interpreting.

Definition at line 49 of file attributeHints.h.

USDUI_API VtDictionary UsdUIAttributeHints::GetValueLabels ( ) const

Return the attribute's value labels dictionary.

This dictionary associates user-facing labels for display in the UI with underlying values to be authored to the attribute when selected.

USDUI_API VtTokenArray UsdUIAttributeHints::GetValueLabelsOrder ( ) const

Return the value labels order, indicating the order in which value labels should appear.

USDUI_API bool UsdUIAttributeHints::SetValueLabels ( const VtDictionary labels)

Set the attribute's value labels dictionary. Return true if successful.

Note that since this field is dictionary-valued, its composed value will be the combination of all its entries as specified across all relevant edit targets. Overrides occur per-entry rather than the dictionary as a whole.

USDUI_API bool UsdUIAttributeHints::SetValueLabelsOrder ( const VtTokenArray &  order)

Set the attribute's value labels order. Return true if successful.


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