![]() |
|
A "schema-like" wrapper that provides API for retrieving and authoring UI hint values within the uiHints dictionary metadata field on a UsdPrim instance.
More...
#include <primHints.h>
Inheritance diagram for UsdUIPrimHints:Public Member Functions | |
| USDUI_API | UsdUIPrimHints () |
| Default constructor that creates an invalid hints object. | |
| USDUI_API | UsdUIPrimHints (const UsdPrim &prim) |
Construct a hints object for the given prim. | |
| UsdPrim | GetPrim () const |
| Return the prim that this hints instance is interpreting. | |
| USDUI_API VtDictionary | GetDisplayGroupsExpanded () const |
| Return the prim's display group expansion dictionary. | |
| USDUI_API bool | SetDisplayGroupsExpanded (const VtDictionary &expanded) |
| Set the prim's display group expansion dictionary. | |
| USDUI_API bool | GetDisplayGroupExpanded (const std::string &group) const |
Return whether the display group named by group should be expanded by default. | |
| USDUI_API bool | SetDisplayGroupExpanded (const std::string &group, bool expanded) |
Set whether the display group named by group should be expanded by default. | |
| USDUI_API VtDictionary | GetDisplayGroupsShownIf () const |
| Return the prim's display group "shown if" dictionary. | |
| USDUI_API bool | SetDisplayGroupsShownIf (const VtDictionary &shownIf) |
Set the prim's display group "shown if" dictionary to shownIf. | |
| USDUI_API std::string | GetDisplayGroupShownIf (const std::string &group) const |
Return the "shown if" expression string for the named group. | |
| USDUI_API bool | SetDisplayGroupShownIf (const std::string &group, const std::string &shownIf) |
Set the "shown if" expression string for the named group to shownIf. | |
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 metadata field on a UsdPrim instance.
UsdUIPrimHints is "schema-like" in that it interprets fields belonging to a core object type (in this case UsdPrim, but see also UsdUIObjectHints, UsdUIPropertyHints, and UsdUIAttributeHints), 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 33 of file primHints.h.
| USDUI_API UsdUIPrimHints | ( | ) |
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 prim.
| USDUI_API bool GetDisplayGroupExpanded | ( | const std::string & | group | ) | const |
Return whether the display group named by group should be expanded by default.
| USDUI_API VtDictionary GetDisplayGroupsExpanded | ( | ) | const |
Return the prim's display group expansion dictionary.
This dictionary is keyed by group name and holds boolean values indicating whether groups should be expanded or collapsed by default.
| USDUI_API std::string GetDisplayGroupShownIf | ( | const std::string & | group | ) | const |
Return the "shown if" expression string for the named group.
| USDUI_API VtDictionary GetDisplayGroupsShownIf | ( | ) | const |
Return the prim's display group "shown if" dictionary.
This dictionary is keyed by group name and holds expression strings that, when evaluated, determine whether the corresponding groups should be shown or hidden in the UI.
|
inline |
Return the prim that this hints instance is interpreting.
Definition at line 48 of file primHints.h.
| USDUI_API bool SetDisplayGroupExpanded | ( | const std::string & | group, |
| bool | expanded | ||
| ) |
Set whether the display group named by group should be expanded by default.
Return true if successful.
| USDUI_API bool SetDisplayGroupsExpanded | ( | const VtDictionary & | expanded | ) |
Set the prim's display group expansion 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 SetDisplayGroupShownIf | ( | const std::string & | group, |
| const std::string & | shownIf | ||
| ) |
Set the "shown if" expression string for the named group to shownIf.
Return true if successful.
| USDUI_API bool SetDisplayGroupsShownIf | ( | const VtDictionary & | shownIf | ) |
Set the prim's display group "shown if" dictionary to shownIf.
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.