24#ifndef PXR_USD_USD_SHADE_CONNECTABLE_BEHAVIOR_H
25#define PXR_USD_USD_SHADE_CONNECTABLE_BEHAVIOR_H
30#include "pxr/usd/usdShade/api.h"
35#include "pxr/base/tf/type.h"
37PXR_NAMESPACE_OPEN_SCOPE
57 DerivedContainerNodes,
64 : _isContainer(false), _requiresEncapsulation(true) {}
68 const bool requiresEncapsulation)
69 : _isContainer(isContainer),
70 _requiresEncapsulation(requiresEncapsulation) {}
92 std::string *reason)
const;
110 std::string *reason)
const;
157 bool _requiresEncapsulation;
211 TfType::Find<PrimType>(),
212 std::shared_ptr<UsdShadeConnectableAPIBehavior>(
new BehaviorType));
220 const TfType& connectablePrimType,
221 const std::shared_ptr<UsdShadeConnectableAPIBehavior>& behavior);
223PXR_NAMESPACE_CLOSE_SCOPE
TfType represents a dynamic runtime type.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
UsdShadeConnectableAPIBehavior defines the compatibilty and behavior UsdShadeConnectableAPIof when ap...
ConnectableNodeTypes
An enum describing the types of connectable nodes which will govern what connectibility rule is invok...
virtual USDSHADE_API bool IsContainer() const final
The function must be thread-safe.
USDSHADE_API bool _CanConnectInputToSource(const UsdShadeInput &, const UsdAttribute &, std::string *reason, ConnectableNodeTypes nodeType=ConnectableNodeTypes::BasicNodes) const
Helper function to separate and share special connectivity logic for specialized, NodeGraph-derived n...
virtual USDSHADE_API bool RequiresEncapsulation() const final
The function must be thread-safe.
virtual USDSHADE_API bool CanConnectInputToSource(const UsdShadeInput &, const UsdAttribute &, std::string *reason) const
The prim owning the input is guaranteed to be of the type this behavior was registered with.
virtual USDSHADE_API bool CanConnectOutputToSource(const UsdShadeOutput &, const UsdAttribute &, std::string *reason) const
The prim owning the output is guaranteed to be of the type this behavior was registered with.
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
void UsdShadeRegisterConnectableAPIBehavior()
Registers behavior to define connectability of attributes for PrimType.