![]() |
|
A "schema-like" wrapper that provides API for retrieving and authoring UI hint values within the uiHints dictionary field on a UsdAttribute instance.
More...
#include <attributeHints.h>
Inheritance diagram for UsdUIAttributeHints:Public Member Functions | |
| USDUI_API | UsdUIAttributeHints () |
| Default constructor that creates an invalid hints object. | |
| USDUI_API | UsdUIAttributeHints (const UsdAttribute &attr) |
Construct a hints object for the given UsdAttribute attr. | |
| UsdAttribute | GetAttribute () const |
| Return the attribute that this hints instance is interpreting. | |
| USDUI_API VtDictionary | GetValueLabels () const |
| Return the attribute's value labels dictionary. | |
| USDUI_API bool | SetValueLabels (const VtDictionary &labels) |
| Set the attribute's value labels dictionary. | |
| USDUI_API VtTokenArray | GetValueLabelsOrder () const |
| Return the value labels order, indicating the order in which value labels should appear. | |
| USDUI_API bool | SetValueLabelsOrder (const VtTokenArray &order) |
Set the attribute's value labels order. Return true if successful. | |
| USDUI_API bool | ApplyValueLabel (const std::string &label) |
Author the value associated with the given label to the attribute. | |
Public Member Functions inherited from UsdUIPropertyHints | |
| USDUI_API | UsdUIPropertyHints () |
| Default constructor that creates an invalid hints object. | |
| USDUI_API | UsdUIPropertyHints (const UsdProperty &prop) |
Construct a hints object for the given UsdProperty prop. | |
| UsdProperty | GetProperty () const |
| Return the property that this hints instance is interpreting. | |
| USDUI_API std::string | GetDisplayGroup () const |
| Return the property's display group, indicating which group it should appear under in the UI. | |
| USDUI_API bool | SetDisplayGroup (const std::string &group) |
Set the object's display group to group. | |
| USDUI_API std::string | GetShownIf () const |
| Return the property's "shown if" expression string. | |
| USDUI_API bool | SetShownIf (const std::string &shownIf) |
| Set the property's "shown if" expression string. | |
Public Member Functions inherited from UsdUIObjectHints | |
| USDUI_API | UsdUIObjectHints () |
| Default constructor that creates an invalid hints object. | |
| USDUI_API | UsdUIObjectHints (const UsdObject &obj) |
Construct a hints object for the given UsdObject obj. | |
| UsdObject | GetObject () const |
| Return the object that this hints intance is interpreting. | |
| USDUI_API std::string | GetDisplayName () const |
| Return the object's display name, indicating how it should appear in the UI. | |
| USDUI_API bool | SetDisplayName (const std::string &name) |
Set the object's display name to name. | |
| USDUI_API bool | GetHidden () const |
| Return the object's hidden status, indicating whether or not it should be hidden from the UI. | |
| USDUI_API bool | SetHidden (bool hidden) |
Set the object's hidden status to hidden. | |
| operator bool () const | |
Return true if this hints object is valid. | |
| bool | operator== (const UsdUIObjectHints &rhs) const |
| Equality operator. | |
| bool | operator!= (const UsdUIObjectHints &rhs) const |
| Inequality operator. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from UsdUIObjectHints | |
| static USDUI_API TfToken | _MakeKeyPath (const TfToken &key1, const TfToken &key2) |
Combine key1 and key2 into a single token, separated by the namespace delimiter ':'. | |
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 UI Hints for an overview of UI hints.
Definition at line 34 of file attributeHints.h.
| USDUI_API UsdUIAttributeHints | ( | ) |
Default constructor that creates an invalid hints object.
Calling "set" operations on this object will post errors. "Get" operations will return fallback values.
|
explicit |
Construct a hints object for the given UsdAttribute attr.
| USDUI_API bool 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.
|
inline |
Return the attribute that this hints instance is interpreting.
Definition at line 49 of file attributeHints.h.
| USDUI_API VtDictionary 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 GetValueLabelsOrder | ( | ) | const |
Return the value labels order, indicating the order in which value labels should appear.
| USDUI_API bool 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 SetValueLabelsOrder | ( | const VtTokenArray & | order | ) |
Set the attribute's value labels order. Return true if successful.