usdrt::UsdUIBackdrop
Defined in usdrt/scenegraph/usd/usdUI/backdrop.h
-
class UsdUIBackdrop : public usdrt::UsdTyped
Provides a ‘group-box’ for the purpose of node graph organization.
Unlike containers, backdrops do not store the Shader nodes inside of them. Backdrops are an organizational tool that allows Shader nodes to be visually grouped together in a node-graph UI, but there is no direct relationship between a Shader node and a Backdrop.
The guideline for a node-graph UI is that a Shader node is considered part of a Backdrop when the Backdrop is the smallest Backdrop a Shader node’s bounding-box fits inside.
Backdrop objects are contained inside a NodeGraph, similar to how Shader objects are contained inside a NodeGraph.
Backdrops have no shading inputs or outputs that influence the rendered results of a NodeGraph. Therefore they can be safely ignored during import.
Like Shaders and NodeGraphs, Backdrops subscribe to the NodeGraphNodeAPI to specify position and size.
For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdUITokens. So to set an attribute to the value “rightHanded”, use UsdUITokens->rightHanded as the value.
Public Functions
-
inline explicit UsdUIBackdrop(const UsdPrim &prim = UsdPrim())
Construct a UsdUIBackdrop on UsdPrim
prim
. Equivalent to UsdUIBackdrop::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.
-
inline explicit UsdUIBackdrop(const UsdSchemaBase &schemaObj)
Construct a UsdUIBackdrop on the prim held by
schemaObj
. Should be preferred over UsdUIBackdrop(schemaObj.GetPrim()), as it preserves SchemaBase state.
-
inline virtual ~UsdUIBackdrop()
Destructor.
-
inline UsdAttribute GetDescriptionAttr() const
The text label that is displayed on the backdrop in the node graph. This help-description explains what the nodes in a backdrop do.
Declaration
uniform token ui:description
C++ Type
Usd Type
SdfValueTypeNames->Token
Variability
SdfVariabilityUniform
-
inline UsdAttribute CreateDescriptionAttr() const
See GetDescriptionAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
inline explicit operator bool() const
Check if this schema object is compatible with it’s held prim and that the prim is valid.
A typed schema object is compatible if the held prim’s type is or is a subtype of the schema’s type. Based on
prim.IsA()
.An API schema object is compatible if the API is of type SingleApplyAPI or UsdSchemaType::MultipleApplyAPI, and the schema has been applied to the prim. Based on
prim.HasAPI
.This method invokes polymorphic behaviour.
See also
- Returns
True if the help prim is valid, and the schema object is compatible with its held prim.
Public Static Functions
-
static inline UsdUIBackdrop Define(const UsdStageRefPtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at
path
is defined (according to UsdPrim::IsDefined()) on this stage.
Public Static Attributes
-
static const UsdSchemaType schemaType = UsdSchemaType::ConcreteTyped
Compile time constant representing what kind of schema this class is.
See also
Protected Functions
-
inline virtual bool _IsCompatible() const
Helper for subclasses to do specific compatibility checking with the given prim. Subclassess may override
_isCompatible
to for example check type compatibility or value compatibility on the prim.Overrides exist for UsdTyped and UsdAPISchemaBase.
This check is called when clients invoke the bool operator.
- Returns
True if the schema object is compatible with its held prim.
-
inline explicit UsdUIBackdrop(const UsdPrim &prim = UsdPrim())