7#ifndef PXR_USD_USD_SHADE_CONNECTABLE_BEHAVIOR_H
8#define PXR_USD_USD_SHADE_CONNECTABLE_BEHAVIOR_H
13#include "pxr/usd/usdShade/api.h"
18#include "pxr/base/tf/type.h"
20PXR_NAMESPACE_OPEN_SCOPE
40 DerivedContainerNodes,
47 : _isContainer(false), _requiresEncapsulation(true) {}
51 const bool requiresEncapsulation)
52 : _isContainer(isContainer),
53 _requiresEncapsulation(requiresEncapsulation) {}
75 std::string *reason)
const;
93 std::string *reason)
const;
140 bool _requiresEncapsulation;
194 TfType::Find<PrimType>(),
195 std::shared_ptr<UsdShadeConnectableAPIBehavior>(
new BehaviorType));
203 const TfType& connectablePrimType,
204 const std::shared_ptr<UsdShadeConnectableAPIBehavior>& behavior);
206PXR_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.