Loading...
Searching...
No Matches
connectableAPIBehavior.h File Reference
+ Include dependency graph for connectableAPIBehavior.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UsdShadeConnectableAPIBehavior
 UsdShadeConnectableAPIBehavior defines the compatibilty and behavior UsdShadeConnectableAPIof when applied to a particular prim type. More...
 

Functions

template<class PrimType , class BehaviorType = UsdShadeConnectableAPIBehavior>
void UsdShadeRegisterConnectableAPIBehavior ()
 Registers behavior to define connectability of attributes for PrimType.
 
USDSHADE_API void UsdShadeRegisterConnectableAPIBehavior (const TfType &connectablePrimType, const std::shared_ptr< UsdShadeConnectableAPIBehavior > &behavior)
 Registers behavior to define connectability of attributes for PrimType.
 

Function Documentation

◆ UsdShadeRegisterConnectableAPIBehavior() [1/2]

void UsdShadeRegisterConnectableAPIBehavior ( )
inline

Registers behavior to define connectability of attributes for PrimType.

Plugins should call this function in a TF_REGISTRY_FUNCTION. For example:

class MyBehavior : public UsdShadeConnectableAPIBehavior { ... }
{
UsdShadeRegisterConnectableAPIBehavior<MyPrim, MyBehavior>();
}
UsdShadeConnectableAPIBehavior defines the compatibilty and behavior UsdShadeConnectableAPIof when ap...
UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and mak...
#define TF_REGISTRY_FUNCTION(KEY_TYPE)
Define a function that is called on demand by TfRegistryManager.

Plugins must also note that UsdShadeConnectableAPI behavior is implemented for a prim type in that type's schema definnition. For example:

class "MyPrim" (
...
customData = {
dictionary extraPlugInfo = {
bool providesUsdShadeConnectableAPIBehavior = true
}
}
...
)
{ ... }

This allows the plugin system to discover this behavior dynamically and load the plugin if needed.

In addition to Typed schemas, single apply API schemas can also include providesUsdShadeConnectableAPIBehavior in their extraPlugInfo and hence impart connectableAPIBehavior to the prim definition in which they are participating. Additionally a schema can include metadata in their extraPlugInfo fields to override isContainer and requiresEncapsulation properties by specifying bool values for isUsdShadeContainer and requiresUsdShadeEncapsulation. This can be especially useful for codeless_schema that cannot provide a C++ derivation of UsdShadeConnectableAPIBehavior.

UsdShadeConnectableAPIBehavior_ResolutionOrder defines the resolution order when multiple types and apiSchemas provide a UsdShadeConnectableAPIBehavior.

Definition at line 208 of file connectableAPIBehavior.h.

◆ UsdShadeRegisterConnectableAPIBehavior() [2/2]

USDSHADE_API void UsdShadeRegisterConnectableAPIBehavior ( const TfType connectablePrimType,
const std::shared_ptr< UsdShadeConnectableAPIBehavior > &  behavior 
)

Registers behavior to define connectability of attributes for PrimType.