24 #ifndef USDRI_GENERATED_MATERIALAPI_H 25 #define USDRI_GENERATED_MATERIALAPI_H 30 #include "pxr/usd/usdRi/api.h" 36 #include "pxr/usd/usdShade/input.h" 37 #include "pxr/usd/usdShade/output.h" 41 #include "pxr/base/vt/value.h" 48 #include "pxr/base/tf/type.h" 50 PXR_NAMESPACE_OPEN_SCOPE
119 Get(
const UsdStagePtr &stage,
const SdfPath &path);
172 static const TfType &_GetStaticTfType();
174 static bool _IsTypedSchema();
178 const TfType &_GetTfType()
const override;
289 bool SetSurfaceSource(
const SdfPath &surfacePath)
const;
292 bool SetDisplacementSource(
const SdfPath &displacementPath)
const;
295 bool SetVolumeSource(
const SdfPath &volumePath)
const;
341 bool computeTransitiveConsumers=
false)
const;
347 bool ignoreBaseMaterial)
const;
353 PXR_NAMESPACE_CLOSE_SCOPE
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...
USDRI_API UsdShadeOutput GetDisplacementOutput() const
Returns the "displacement" output associated with the material.
virtual USDRI_API ~UsdRiMaterialAPI()
Destructor.
std::unordered_map< UsdShadeInput, std::vector< UsdShadeInput >, UsdShadeInput::Hash > InterfaceInputConsumersMap
Map of interface inputs to corresponding vectors of inputs that consume their values.
UsdPrim GetPrim() const
Return this schema object's held prim.
The base class for all API schemas.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
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 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 UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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.
UsdRiMaterialAPI(const UsdSchemaBase &schemaObj)
Construct a UsdRiMaterialAPI on the prim held by schemaObj .
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.
USDRI_API UsdAttribute GetVolumeAttr() const
A path value used to locate objects in layers or scenegraphs.
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.
USDRI_API UsdShadeShader GetDisplacement(bool ignoreBaseMaterial=false) const
Returns a valid shader object if the "displacement" output on the material is connected to one.
Contains an asset path and an optional resolved path.
UsdRiMaterialAPI(const UsdShadeMaterial &material)
A constructor for creating a MaterialAPI object from a material prim.
static USDRI_API UsdRiMaterialAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
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.
UsdRiMaterialAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdRiMaterialAPI on UsdPrim prim .
Base class for all USD shaders.
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
USDRI_API UsdShadeOutput GetVolumeOutput() const
Returns the "volume" output associated with the material.
A Material provides a container into which multiple "render targets" can add data that defines a "sha...
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...
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.
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
USDRI_API UsdShadeShader GetSurface(bool ignoreBaseMaterial=false) const
Returns a valid shader object if the "surface" output on the material is connected to one.
The base class for all schema types in Usd.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
USDRI_API UsdAttribute GetDisplacementAttr() const
USDRI_API UsdShadeOutput GetSurfaceOutput() const
Returns the "surface" output associated with the material.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
USDRI_API UsdAttribute GetSurfaceAttr() const