usdrt::UsdShadeConnectableAPI
Defined in usdrt/scenegraph/usd/usdShade/connectableAPI.h
Functions
usdrt::DestructionSchemaDestructibleBaseAPI::GetPath: Return the SdfPath to this schema object's held prim.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPrim: Return this schema object's held prim.
usdrt::UsdShadeConnectableAPI::UsdShadeConnectableAPI: Construct a UsdShadeConnectableAPI on the prim held by
schemaObj
. Should be preferred over UsdShadeConnectableAPI (schemaObj.GetPrim()), as it preserves SchemaBase state.usdrt::UsdShadeConnectableAPI::UsdShadeConnectableAPI: Construct a UsdShadeConnectableAPI on UsdPrim
prim
. Equivalent to UsdShadeConnectableAPI::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.usdrt::DestructionSchemaDestructibleBaseAPI::_GetInstanceName: Returns the instance name of the API schema object belonging to a multiple-apply API schema.
usdrt::UsdShadeConnectableAPI::operator bool: Boolean operator.
usdrt::UsdShadeConnectableAPI::~UsdShadeConnectableAPI: Destructor.
Variables
usdrt::UsdShadeConnectableAPI::schemaType: Compile time constant representing what kind of schema this class is.
-
class UsdShadeConnectableAPI : public usdrt::UsdAPISchemaBase
UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and making connections between shading parameters and outputs. The interface is common to all UsdShade schemas that support Inputs and Outputs, which currently includes UsdShadeShader, UsdShadeNodeGraph, and UsdShadeMaterial .
One can construct a UsdShadeConnectableAPI directly from a UsdPrim, or from objects of any of the schema classes listed above. If it seems onerous to need to construct a secondary schema object to interact with Inputs and Outputs, keep in mind that any function whose purpose is either to walk material/shader networks via their connections, or to create such networks, can typically be written entirely in terms of UsdShadeConnectableAPI objects, without needing to care what the underlying prim type is.
Additionally, the most common UsdShadeConnectableAPI behaviors (creating Inputs and Outputs, and making connections) are wrapped as convenience methods on the prim schema classes (creation) and UsdShadeInput and UsdShadeOutput.
Public Functions
-
inline explicit UsdShadeConnectableAPI(const UsdPrim &prim = UsdPrim())
Construct a UsdShadeConnectableAPI on UsdPrim
prim
. Equivalent to UsdShadeConnectableAPI::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.
-
inline explicit UsdShadeConnectableAPI(const UsdSchemaBase &schemaObj)
Construct a UsdShadeConnectableAPI on the prim held by
schemaObj
. Should be preferred over UsdShadeConnectableAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
-
inline virtual ~UsdShadeConnectableAPI()
Destructor.
-
inline operator bool() const
Boolean operator.
- Returns
Return true if the contained prim is has this api schema applied using
HasAPI
, and false otherwise.
Public Static Attributes
-
static const UsdSchemaType schemaType = UsdSchemaType::NonAppliedAPI
Compile time constant representing what kind of schema this class is.
See also
UsdSchemaType
-
inline explicit UsdShadeConnectableAPI(const UsdPrim &prim = UsdPrim())