7#ifndef USDRI_GENERATED_MATERIALAPI_H
8#define USDRI_GENERATED_MATERIALAPI_H
13#include "pxr/usd/usdRi/api.h"
19#include "pxr/usd/usdShade/input.h"
20#include "pxr/usd/usdShade/output.h"
24#include "pxr/base/vt/value.h"
31#include "pxr/base/tf/type.h"
33PXR_NAMESPACE_OPEN_SCOPE
155 static const TfType &_GetStaticTfType();
157 static bool _IsTypedSchema();
161 const TfType &_GetTfType()
const override;
272 bool SetSurfaceSource(
const SdfPath &surfacePath)
const;
275 bool SetDisplacementSource(
const SdfPath &displacementPath)
const;
278 bool SetVolumeSource(
const SdfPath &volumePath)
const;
324 bool computeTransitiveConsumers=
false)
const;
330 bool ignoreBaseMaterial)
const;
336PXR_NAMESPACE_CLOSE_SCOPE
Contains an asset path and an optional resolved path.
A path value used to locate objects in layers or scenegraphs.
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 ...
USDRI_API UsdShadeOutput GetVolumeOutput() const
Returns the "volume" output associated with the material.
virtual USDRI_API ~UsdRiMaterialAPI()
Destructor.
UsdRiMaterialAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdRiMaterialAPI on UsdPrim prim .
USDRI_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.
USDRI_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static USDRI_API UsdRiMaterialAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdRiMaterialAPI holding the prim adhering to this schema at path on stage.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
USDRI_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.
static USDRI_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...
USDRI_API UsdShadeShader GetDisplacement(bool ignoreBaseMaterial=false) const
Returns a valid shader object if the "displacement" output on the material is connected to one.
USDRI_API UsdShadeNodeGraph::InterfaceInputConsumersMap ComputeInterfaceInputConsumersMap(bool computeTransitiveConsumers=false) const
Walks the namespace subtree below the material and computes a map containing the list of all inputs o...
UsdRiMaterialAPI(const UsdSchemaBase &schemaObj)
Construct a UsdRiMaterialAPI on the prim held by schemaObj .
USDRI_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.
USDRI_API UsdShadeShader GetVolume(bool ignoreBaseMaterial=false) const
Returns a valid shader object if the "volume" output on the material is connected to one.
USDRI_API UsdShadeOutput GetSurfaceOutput() const
Returns the "surface" output associated with the material.
static USDRI_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.
USDRI_API UsdShadeShader GetSurface(bool ignoreBaseMaterial=false) const
Returns a valid shader object if the "surface" output on the material is connected to one.
USDRI_API UsdAttribute GetDisplacementAttr() const
USDRI_API UsdAttribute GetSurfaceAttr() const
static USDRI_API UsdRiMaterialAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
UsdRiMaterialAPI(const UsdShadeMaterial &material)
A constructor for creating a MaterialAPI object from a material prim.
USDRI_API UsdShadeOutput GetDisplacementOutput() const
Returns the "displacement" output associated with the material.
USDRI_API UsdAttribute GetVolumeAttr() const
The base class for all schema types in Usd.
UsdPrim GetPrim() const
Return this schema object's held prim.
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...
std::unordered_map< UsdShadeInput, std::vector< UsdShadeInput >, UsdShadeInput::Hash > InterfaceInputConsumersMap
Map of interface inputs to corresponding vectors of inputs that consume their values.
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
Base class for all USD shaders.
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.