7#ifndef USDSHADE_GENERATED_NODEDEFAPI_H
8#define USDSHADE_GENERATED_NODEDEFAPI_H
13#include "pxr/usd/usdShade/api.h"
23#include "pxr/base/vt/value.h"
30#include "pxr/base/tf/type.h"
32PXR_NAMESPACE_OPEN_SCOPE
167 static const TfType &_GetStaticTfType();
169 static bool _IsTypedSchema();
173 const TfType &_GetTfType()
const override;
386 const std::string &sourceCode,
406 std::string *sourceCode,
432PXR_NAMESPACE_CLOSE_SCOPE
Contains an asset path and an optional resolved path.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
TfType represents a dynamic runtime type.
The base class for all API schemas.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
The base class for all schema types in Usd.
Singleton registry that provides access to schema type information and the prim definitions for regis...
UsdShadeNodeDefAPI is an API schema that provides attributes for a prim to select a corresponding Sha...
USDSHADE_API bool GetSourceCode(std::string *sourceCode, const TfToken &sourceType=UsdShadeTokens->universalSourceType) const
Fetches the shader's source code for the specified sourceType value by reading the info:sourceType:so...
USDSHADE_API bool GetSourceAsset(SdfAssetPath *sourceAsset, const TfToken &sourceType=UsdShadeTokens->universalSourceType) const
Fetches the shader's source asset value for the specified sourceType value from the info:sourceType:s...
USDSHADE_API UsdAttribute GetImplementationSourceAttr() const
Specifies the attribute that should be consulted to get the shader's implementation or its source cod...
USDSHADE_API bool SetSourceAsset(const SdfAssetPath &sourceAsset, const TfToken &sourceType=UsdShadeTokens->universalSourceType) const
Sets the shader's source-asset path value to sourceAsset for the given source type,...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
USDSHADE_API bool SetShaderId(const TfToken &id) const
Sets the shader's ID value.
USDSHADE_API UsdAttribute CreateImplementationSourceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetImplementationSourceAttr(), and also Create vs Get Property Methods for when to use Get vs Cre...
USDSHADE_API std::vector< std::string > GetSourceTypes() const
Fetches the source types for the specified prim value by reading the info:sourceType:<implementationS...
UsdShadeNodeDefAPI(const UsdSchemaBase &schemaObj)
Construct a UsdShadeNodeDefAPI on the prim held by schemaObj .
virtual USDSHADE_API ~UsdShadeNodeDefAPI()
Destructor.
static USDSHADE_API UsdShadeNodeDefAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdShadeNodeDefAPI holding the prim adhering to this schema at path on stage.
UsdShadeNodeDefAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdShadeNodeDefAPI on UsdPrim prim .
static USDSHADE_API bool CanApply(const UsdPrim &prim, std::string *whyNot=nullptr)
Returns true if this single-apply API schema can be applied to the given prim.
USDSHADE_API bool SetSourceCode(const std::string &sourceCode, const TfToken &sourceType=UsdShadeTokens->universalSourceType) const
Sets the shader's source-code value to sourceCode for the given source type, sourceType.
USDSHADE_API TfToken GetImplementationSource() const
Reads the value of info:implementationSource attribute and returns a token identifying the attribute ...
static USDSHADE_API UsdShadeNodeDefAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
USDSHADE_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static USDSHADE_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDSHADE_API bool GetSourceAssetSubIdentifier(TfToken *subIdentifier, const TfToken &sourceType=UsdShadeTokens->universalSourceType) const
Fetches the shader's sub-identifier for the source asset with the specified sourceType value from the...
USDSHADE_API SdrShaderNodeConstPtr GetShaderNodeForSourceType(const TfToken &sourceType) const
This method attempts to ensure that there is a ShaderNode in the shader registry (i....
USDSHADE_API bool SetSourceAssetSubIdentifier(const TfToken &subIdentifier, const TfToken &sourceType=UsdShadeTokens->universalSourceType) const
Set a sub-identifier to be used with a source asset of the given source type.
USDSHADE_API bool GetShaderId(TfToken *id) const
Fetches the shader's ID value from the info:id attribute, if the shader's info:implementationSource i...
USDSHADE_API UsdAttribute GetIdAttr() const
The id is an identifier for the type or purpose of the shader.
USDSHADE_API UsdAttribute CreateIdAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetIdAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Common typedefs that are used throughout the NDR library.
USDSHADE_API TfStaticData< UsdShadeTokensType > UsdShadeTokens
A global variable with static, efficient TfTokens for use in all public USD API.