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

#include <primHints.h>

+ Inheritance diagram for UsdUIPrimHints:

Public Member Functions

USDUI_API UsdUIPrimHints ()
 
USDUI_API UsdUIPrimHints (const UsdPrim &prim)
 Construct a hints object for the given prim. More...
 
UsdPrim GetPrim () const
 Return the prim that this hints instance is interpreting. More...
 
USDUI_API VtDictionary GetDisplayGroupsExpanded () const
 
USDUI_API bool SetDisplayGroupsExpanded (const VtDictionary &expanded)
 
USDUI_API bool GetDisplayGroupExpanded (const std::string &group) const
 
USDUI_API bool SetDisplayGroupExpanded (const std::string &group, bool expanded)
 
USDUI_API VtDictionary GetDisplayGroupsShownIf () const
 
USDUI_API bool SetDisplayGroupsShownIf (const VtDictionary &shownIf)
 
USDUI_API std::string GetDisplayGroupShownIf (const std::string &group) const
 Return the "shown if" expression string for the named group. More...
 
USDUI_API bool SetDisplayGroupShownIf (const std::string &group, 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 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 usdUI_hintsOverview for an overview of UI hints.

Definition at line 33 of file primHints.h.

Constructor & Destructor Documentation

USDUI_API UsdUIPrimHints::UsdUIPrimHints ( )

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 UsdUIPrimHints::UsdUIPrimHints ( const UsdPrim prim)
explicit

Construct a hints object for the given prim.

Member Function Documentation

USDUI_API bool UsdUIPrimHints::GetDisplayGroupExpanded ( const std::string &  group) const

Return whether the display group named by group should be expanded by default.

USDUI_API VtDictionary UsdUIPrimHints::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 UsdUIPrimHints::GetDisplayGroupShownIf ( const std::string &  group) const

Return the "shown if" expression string for the named group.

USDUI_API VtDictionary UsdUIPrimHints::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.

See Also
UsdUIPropertyHints::GetShownIf()
UsdPrim UsdUIPrimHints::GetPrim ( ) const
inline

Return the prim that this hints instance is interpreting.

Definition at line 48 of file primHints.h.

USDUI_API bool UsdUIPrimHints::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 UsdUIPrimHints::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 UsdUIPrimHints::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 UsdUIPrimHints::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.

See Also
UsdUIPropertyHints::SetShownIf()

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