All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
connectableAPIBehavior.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/usdShade/api.h"
#include "pxr/base/gf/vec3f.h"
#include "pxr/base/vt/array.h"
#include "pxr/base/tf/type.h"
+ 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.


class  UsdShadeConnectableAPIBehavior


template<class PrimType , class BehaviorType = UsdShadeConnectableAPIBehavior>
void UsdShadeRegisterConnectableAPIBehavior ()
USDSHADE_API void UsdShadeRegisterConnectableAPIBehavior (const TfType &connectablePrimType, const std::shared_ptr< UsdShadeConnectableAPIBehavior > &behavior)

Function Documentation

template<class PrimType , class BehaviorType = UsdShadeConnectableAPIBehavior>
void UsdShadeRegisterConnectableAPIBehavior ( )

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>();

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.

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

Registers behavior to define connectability of attributes for PrimType.