7#ifndef USDSHADE_GENERATED_MATERIAL_H
8#define USDSHADE_GENERATED_MATERIAL_H
13#include "pxr/usd/usdShade/api.h"
19#include "pxr/usd/usd/variantSets.h"
23#include "pxr/base/vt/value.h"
30#include "pxr/base/tf/type.h"
32PXR_NAMESPACE_OPEN_SCOPE
181 static const TfType &_GetStaticTfType();
183 static bool _IsTypedSchema();
187 const TfType &_GetTfType()
const override;
338 UsdShadeAttributeType *sourceType=
nullptr)
const;
356 UsdShadeAttributeType *sourceType=
nullptr)
const;
395 UsdShadeAttributeType *sourceType=
nullptr)
const;
413 UsdShadeAttributeType *sourceType=
nullptr)
const;
451 UsdShadeAttributeType *sourceType=
nullptr)
const;
469 UsdShadeAttributeType *sourceType=
nullptr)
const;
486 UsdShadeAttributeType *sourceType)
const;
490 std::vector<UsdShadeOutput> _GetOutputsForTerminalName(
491 const TfToken& terminalName)
const;
586 std::pair<UsdStagePtr, UsdEditTarget>
588 const SdfLayerHandle &layer = SdfLayerHandle())
const;
626 const std::vector<UsdPrim> &MaterialPrims,
677 bool HasBaseMaterial()
const;
683PXR_NAMESPACE_CLOSE_SCOPE
PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific...
Contains an asset path and an optional resolved path.
A path value used to locate objects in layers or scenegraphs.
This is a small-vector class with local storage optimization, the local storage can be specified via ...
Token for efficient comparison, assignment, and hashing of known strings.
TfType represents a dynamic runtime type.
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...
A Material provides a container into which multiple "render contexts" can add data that defines a "sh...
USDSHADE_API UsdAttribute CreateVolumeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVolumeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDSHADE_API UsdAttribute GetDisplacementAttr() const
Represents the universal "displacement" output terminal of a material.
USDSHADE_API UsdAttribute CreateSurfaceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSurfaceAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDSHADE_API UsdShadeShader ComputeSurfaceSource(const TfTokenVector &contextVector={UsdShadeTokens->universalRenderContext}, TfToken *sourceName=nullptr, UsdShadeAttributeType *sourceType=nullptr) const
Computes the resolved "surface" output source for the given contextVector.
USDSHADE_API UsdAttribute GetVolumeAttr() const
Represents the universal "volume" output terminal of a material.
virtual USDSHADE_API ~UsdShadeMaterial()
Destructor.
USDSHADE_API UsdShadeShader ComputeVolumeSource(const TfToken &renderContext, TfToken *sourceName=nullptr, UsdShadeAttributeType *sourceType=nullptr) const
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
USDSHADE_API void SetBaseMaterialPath(const SdfPath &baseMaterialPath) const
Set the path to the base Material of this Material.
static USDSHADE_API SdfPath FindBaseMaterialPathInPrimIndex(const PcpPrimIndex &primIndex, const PathPredicate &pathIsMaterialPredicate)
Given a PcpPrimIndex, searches it for an arc to a parent material.
USDSHADE_API UsdShadeOutput CreateVolumeOutput(const TfToken &renderContext=UsdShadeTokens->universalRenderContext) const
Creates and returns the "volume" output on this material for the specified renderContext.
USDSHADE_API UsdShadeShader ComputeDisplacementSource(const TfTokenVector &contextVector={UsdShadeTokens->universalRenderContext}, TfToken *sourceName=nullptr, UsdShadeAttributeType *sourceType=nullptr) const
Computes the resolved "displacement" output source for the given contextVector.
static USDSHADE_API bool CreateMasterMaterialVariant(const UsdPrim &masterPrim, const std::vector< UsdPrim > &MaterialPrims, const TfToken &masterVariantSetName=TfToken())
Create a variantSet on masterPrim that will set the MaterialVariant on each of the given MaterialPrim...
USDSHADE_API UsdShadeOutput GetDisplacementOutput(const TfToken &renderContext=UsdShadeTokens->universalRenderContext) const
Returns the "displacement" output of this material for the specified renderContext.
std::function< bool(const SdfPath &)> PathPredicate
A function type that takes a path and returns a bool.
USDSHADE_API std::pair< UsdStagePtr, UsdEditTarget > GetEditContextForVariant(const TfToken &MaterialVariantName, const SdfLayerHandle &layer=SdfLayerHandle()) const
Helper function for configuring a UsdStage's UsdEditTarget to author Material variations.
USDSHADE_API UsdShadeMaterial GetBaseMaterial() const
Get the path to the base Material of this Material.
UsdShadeMaterial(const UsdPrim &prim=UsdPrim())
Construct a UsdShadeMaterial on UsdPrim prim .
USDSHADE_API UsdShadeShader ComputeVolumeSource(const TfTokenVector &contextVector={UsdShadeTokens->universalRenderContext}, TfToken *sourceName=nullptr, UsdShadeAttributeType *sourceType=nullptr) const
Computes the resolved "volume" output source for the given contextVector.
static USDSHADE_API UsdShadeMaterial Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdShadeMaterial holding the prim adhering to this schema at path on stage.
USDSHADE_API UsdShadeShader ComputeSurfaceSource(const TfToken &renderContext, TfToken *sourceName=nullptr, UsdShadeAttributeType *sourceType=nullptr) const
USDSHADE_API UsdAttribute GetSurfaceAttr() const
Represents the universal "surface" output terminal of a material.
USDSHADE_API UsdShadeShader ComputeDisplacementSource(const TfToken &renderContext, TfToken *sourceName=nullptr, UsdShadeAttributeType *sourceType=nullptr) const
USDSHADE_API void ClearBaseMaterial() const
Clear the base Material of this Material.
USDSHADE_API std::vector< UsdShadeOutput > GetVolumeOutputs() const
Returns the "volume" outputs of this material for all available renderContexts.
USDSHADE_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDSHADE_API UsdShadeOutput CreateDisplacementOutput(const TfToken &renderContext=UsdShadeTokens->universalRenderContext) const
Creates and returns the "displacement" output on this material for the specified renderContext.
USDSHADE_API void SetBaseMaterial(const UsdShadeMaterial &baseMaterial) const
Set the base Material of this Material.
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 UsdVariantSet GetMaterialVariant() const
Return a UsdVariantSet object for interacting with the Material variant variantSet.
UsdShadeMaterial(const UsdSchemaBase &schemaObj)
Construct a UsdShadeMaterial on the prim held by schemaObj .
USDSHADE_API SdfPath GetBaseMaterialPath() const
Get the base Material of this Material.
USDSHADE_API std::vector< UsdShadeOutput > GetDisplacementOutputs() const
Returns the "displacement" outputs of this material for all available renderContexts.
USDSHADE_API UsdShadeOutput CreateSurfaceOutput(const TfToken &renderContext=UsdShadeTokens->universalRenderContext) const
Creates and returns the "surface" output on this material for the specified renderContext.
static USDSHADE_API UsdShadeMaterial Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDSHADE_API UsdShadeOutput GetVolumeOutput(const TfToken &renderContext=UsdShadeTokens->universalRenderContext) const
Returns the "volume" output of this material for the specified renderContext.
USDSHADE_API std::vector< UsdShadeOutput > GetSurfaceOutputs() const
Returns the "surface" outputs of this material for all available renderContexts.
USDSHADE_API UsdShadeOutput GetSurfaceOutput(const TfToken &renderContext=UsdShadeTokens->universalRenderContext) const
Returns the "surface" output of this material for the specified renderContext.
USDSHADE_API UsdAttribute CreateDisplacementAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDisplacementAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
A node-graph is a container for shading nodes, as well as other node-graphs.
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
Base class for all USD shaders.
A UsdVariantSet represents a single VariantSet in USD (e.g.
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.
USDSHADE_API TfStaticData< UsdShadeTokensType > UsdShadeTokens
A global variable with static, efficient TfTokens for use in all public USD API.