24 #ifndef USDSHADE_GENERATED_CONNECTABLEAPI_H
25 #define USDSHADE_GENERATED_CONNECTABLEAPI_H
142 static const TfType &_GetStaticTfType();
144 static bool _IsTypedSchema();
148 const TfType &_GetTfType()
const override;
427 std::vector<UsdShadeConnectionSourceInfo>
const &sourceInfos);
679 template <
typename T>
683 "Provided type must derive UsdSchemaBase.");
717 bool onlyAuthored=
true)
const;
746 bool onlyAuthored=
true)
const;
778 , sourceName(sourceName_)
783 : source(input.GetPrim())
784 , sourceName(input.GetBaseName())
789 : source(output.GetPrim())
790 , sourceName(output.GetBaseName())
800 UsdStagePtr
const& stage,
814 explicit operator bool()
const {
824 return !(*
this == other);
UsdShadeConnectionSourceInfo(UsdShadeInput const &input)
static USDSHADE_API bool ConnectToSource(UsdShadeOutput const &output, SdfPath const &sourcePath)
static USDSHADE_API bool GetConnectedSource(UsdShadeOutput const &output, UsdShadeConnectableAPI *source, TfToken *sourceName, UsdShadeAttributeType *sourceType)
static USDSHADE_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
static USDSHADE_API bool GetRawConnectedSourcePaths(UsdShadeInput const &input, SdfPathVector *sourcePaths)
static USDSHADE_API bool IsSourceConnectionFromBaseMaterial(const UsdShadeOutput &output)
static USDSHADE_API bool ConnectToSource(UsdShadeOutput const &output, UsdShadeConnectableAPI const &source, TfToken const &sourceName, UsdShadeAttributeType const sourceType=UsdShadeAttributeType::Output, SdfValueTypeName typeName=SdfValueTypeName())
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
static USDSHADE_API bool ConnectToSource(UsdShadeInput const &input, UsdShadeInput const &sourceInput)
static USDSHADE_API bool ClearSource(UsdShadeInput const &input)
USDSHADE_API UsdShadeInput GetInput(const TfToken &name) const
static USDSHADE_API bool ConnectToSource(UsdShadeInput const &input, UsdShadeConnectableAPI const &source, TfToken const &sourceName, UsdShadeAttributeType const sourceType=UsdShadeAttributeType::Output, SdfValueTypeName typeName=SdfValueTypeName())
static USDSHADE_API bool ConnectToSource(UsdShadeInput const &input, UsdShadeOutput const &sourceOutput)
USDSHADE_API std::vector< UsdShadeInput > GetInputs(bool onlyAuthored=true) const
UsdShadeConnectionModification
static USDSHADE_API bool CanConnect(const UsdShadeOutput &output, const UsdShadeInput &sourceInput)
static USDSHADE_API bool DisconnectSource(UsdAttribute const &shadingAttr, UsdAttribute const &sourceAttr=UsdAttribute())
static USDSHADE_API bool CanConnect(const UsdShadeInput &input, const UsdShadeInput &sourceInput)
USDSHADE_API std::vector< UsdShadeOutput > GetOutputs(bool onlyAuthored=true) const
static USDSHADE_API UsdShadeConnectableAPI Get(const UsdStagePtr &stage, const SdfPath &path)
const UsdAttribute & GetAttr() const
Explicit UsdAttribute extractor.
bool operator==(UsdShadeConnectionSourceInfo const &other) const
USDSHADE_API UsdShadeOutput GetOutput(const TfToken &name) const
static USDSHADE_API bool GetRawConnectedSourcePaths(UsdAttribute const &shadingAttr, SdfPathVector *sourcePaths)
static bool HasConnectableAPI()
UsdShadeConnectableAPI(const UsdSchemaBase &schemaObj)
void GetAttr(const OrtKernelInfo *p, const char *name, float &)
static USDSHADE_API bool HasConnectedSource(const UsdShadeInput &input)
static USDSHADE_API bool ClearSources(UsdShadeOutput const &output)
UsdShadeConnectionSourceInfo(UsdShadeConnectableAPI const &source_, TfToken const &sourceName_, UsdShadeAttributeType sourceType_, SdfValueTypeName typeName_=SdfValueTypeName())
static USDSHADE_API bool HasConnectedSource(const UsdAttribute &shadingAttr)
GLsizei GLsizei GLchar * source
static USDSHADE_API bool ConnectToSource(UsdShadeInput const &input, SdfPath const &sourcePath)
std::vector< TfToken > TfTokenVector
Convenience types.
GLuint const GLchar * name
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
static USDSHADE_API bool ClearSources(UsdAttribute const &shadingAttr)
static USDSHADE_API bool ConnectToSource(UsdShadeOutput const &output, UsdShadeOutput const &sourceOutput)
UsdShadeConnectionSourceInfo(UsdShadeOutput const &output)
static USDSHADE_API bool DisconnectSource(UsdShadeOutput const &output, UsdAttribute const &sourceAttr=UsdAttribute())
virtual USDSHADE_API ~UsdShadeConnectableAPI()
Destructor.
USDSHADE_API bool RequiresEncapsulation() const
static USDSHADE_API bool GetRawConnectedSourcePaths(UsdShadeOutput const &output, SdfPathVector *sourcePaths)
USDSHADE_API bool _IsCompatible() const override
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
static const UsdSchemaKind schemaKind
static USDSHADE_API bool ConnectToSource(UsdShadeOutput const &output, UsdShadeConnectionSourceInfo const &source, ConnectionModification const mod=ConnectionModification::Replace)
SdfValueTypeName typeName
static USDSHADE_API bool DisconnectSource(UsdShadeInput const &input, UsdAttribute const &sourceAttr=UsdAttribute())
static USDSHADE_API bool ClearSource(UsdAttribute const &shadingAttr)
static USDSHADE_API bool ClearSource(UsdShadeOutput const &output)
static USDSHADE_API bool SetConnectedSources(UsdAttribute const &shadingAttr, std::vector< UsdShadeConnectionSourceInfo > const &sourceInfos)
#define PXR_NAMESPACE_CLOSE_SCOPE
static USDSHADE_API bool GetConnectedSource(UsdAttribute const &shadingAttr, UsdShadeConnectableAPI *source, TfToken *sourceName, UsdShadeAttributeType *sourceType)
USDSHADE_API UsdShadeInput CreateInput(const TfToken &name, const SdfValueTypeName &typeName) const
static USDSHADE_API UsdShadeSourceInfoVector GetConnectedSources(UsdAttribute const &shadingAttr, SdfPathVector *invalidSourcePaths=nullptr)
static USDSHADE_API bool CanConnect(const UsdShadeInput &input, const UsdAttribute &source)
static USDSHADE_API bool CanConnect(const UsdShadeInput &input, const UsdShadeOutput &sourceOutput)
static USDSHADE_API bool ConnectToSource(UsdAttribute const &shadingAttr, UsdShadeConnectionSourceInfo const &source, ConnectionModification const mod=ConnectionModification::Replace)
bool operator!=(const UsdShadeConnectionSourceInfo &other) const
USDSHADE_API UsdSchemaKind _GetSchemaKind() const override
UsdShadeAttributeType sourceType
UsdShadeConnectableAPI(const UsdPrim &prim=UsdPrim())
UsdShadeConnectionSourceInfo()=default
static USDSHADE_API bool IsSourceConnectionFromBaseMaterial(const UsdAttribute &shadingAttr)
static USDSHADE_API bool IsSourceConnectionFromBaseMaterial(const UsdShadeInput &input)
UsdShadeConnectableAPI source
static USDSHADE_API bool HasConnectedSource(const UsdShadeOutput &output)
static USDSHADE_API bool ClearSources(UsdShadeInput const &input)
bool IsValid() const
Return true if this source info is valid for setting up a connection.
static USDSHADE_API bool ConnectToSource(UsdShadeOutput const &output, UsdShadeInput const &sourceInput)
UsdPrim GetPrim() const
Return this schema object's held prim.
static USDSHADE_API bool CanConnect(const UsdShadeOutput &output, const UsdShadeOutput &sourceOutput)
USDSHADE_API UsdShadeOutput CreateOutput(const TfToken &name, const SdfValueTypeName &typeName) const
static USDSHADE_API bool GetConnectedSource(UsdShadeInput const &input, UsdShadeConnectableAPI *source, TfToken *sourceName, UsdShadeAttributeType *sourceType)
static USDSHADE_API bool ConnectToSource(UsdShadeInput const &input, UsdShadeConnectionSourceInfo const &source, ConnectionModification const mod=ConnectionModification::Replace)
USDSHADE_API bool IsContainer() const
bool IsEmpty() const
Returns true iff this token contains the empty string "".