24 #ifndef USDSHADE_GENERATED_NODEDEFAPI_H
25 #define USDSHADE_GENERATED_NODEDEFAPI_H
30 #include "pxr/usd/usdShade/api.h"
40 #include "pxr/base/vt/value.h"
47 #include "pxr/base/tf/type.h"
49 PXR_NAMESPACE_OPEN_SCOPE
131 Get(
const UsdStagePtr &stage,
const SdfPath &path);
184 static const TfType &_GetStaticTfType();
186 static bool _IsTypedSchema();
190 const TfType &_GetTfType()
const override;
403 const std::string &sourceCode,
423 std::string *sourceCode,
439 PXR_NAMESPACE_CLOSE_SCOPE
USDSHADE_API TfToken GetImplementationSource() const
Reads the value of info:implementationSource attribute and returns a token identifying the attribute ...
USDSHADE_API UsdAttribute GetImplementationSourceAttr() const
Specifies the attribute that should be consulted to get the shader's implementation or its source cod...
static USDSHADE_API UsdShadeNodeDefAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
USDSHADE_API UsdAttribute GetIdAttr() const
The id is an identifier for the type or purpose of the shader.
virtual USDSHADE_API ~UsdShadeNodeDefAPI()
Destructor.
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, sourceType.
UsdShadeNodeDefAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdShadeNodeDefAPI on UsdPrim prim .
The base class for all API schemas.
USDSHADE_API bool SetShaderId(const TfToken &id) const
Sets the shader's ID value.
UsdShadeNodeDefAPI is an API schema that provides attributes for a prim to select a corresponding Sha...
Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time.
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...
UsdShadeNodeDefAPI(const UsdSchemaBase &schemaObj)
Construct a UsdShadeNodeDefAPI on the prim held by schemaObj .
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
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...
Token for efficient comparison, assignment, and hashing of known strings.
USDSHADE_API SdrShaderNodeConstPtr GetShaderNodeForSourceType(const TfToken &sourceType) const
This method attempts to ensure that there is a ShaderNode in the shader registry (i.e.
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 GetShaderId(TfToken *id) const
Fetches the shader's ID value from the info:id attribute, if the shader's info:implementationSource i...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
USDSHADE_API TfStaticData< UsdShadeTokensType > UsdShadeTokens
A global variable with static, efficient TfTokens for use in all public USD API.
Contains an asset path and an optional resolved path.
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.
USDSHADE_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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 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 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.
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
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.
The base class for all schema types in Usd.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
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...
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.