usdrt::UsdShadeMaterial

Defined in usdrt/scenegraph/usd/usdShade/material.h

Functions

Variables

class UsdShadeMaterial : public usdrt::UsdShadeNodeGraph

A Material provides a container into which multiple “render targets” can add data that defines a “shading material” for a renderer. Typically this consists of one or more UsdRelationship properties that target other prims of type Shader - though a target/client is free to add any data that is suitable. We strongly advise that all targets adopt the convention that all properties be prefixed with a namespace that identifies the target, e.g. “rel ri:surface = </Shaders/mySurf>”.

Public Functions

inline explicit UsdShadeMaterial(const UsdPrim &prim = UsdPrim())

Construct a UsdShadeMaterial on UsdPrim prim. Equivalent to UsdShadeMaterial::Get(prim.GetStage(), prim.GetPath()) for a valid prim , but will not immediately throw an error for an invalid prim.

inline explicit UsdShadeMaterial(const UsdSchemaBase &schemaObj)

Construct a UsdShadeMaterial on the prim held by schemaObj . Should be preferred over UsdShadeMaterial(schemaObj.GetPrim()), as it preserves SchemaBase state.

inline virtual ~UsdShadeMaterial()

Destructor.

inline operator bool() const

Boolean operator.

Returns

Return true if the contained prim is an instance of this schema using IsA, and false otherwise.

inline UsdAttribute GetSurfaceAttr() const

Represents the universal “surface” output terminal of a material.

Declaration

token outputs:surface

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

inline UsdAttribute CreateSurfaceAttr() const

See GetSurfaceAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetDisplacementAttr() const

Represents the universal “displacement” output terminal of a material.

Declaration

token outputs:displacement

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

inline UsdAttribute CreateDisplacementAttr() const

See GetDisplacementAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetVolumeAttr() const

Represents the universal “volume” output terminal of a material.

Declaration

token outputs:volume

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

inline UsdAttribute CreateVolumeAttr() const

See GetVolumeAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

Return the SdfPath to this schema object’s held prim.

Public Static Functions

static inline UsdShadeMaterial Define(const UsdStageRefPtr &stage, const SdfPath &path)

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::ConcreteTyped

Compile time constant representing what kind of schema this class is.

See also

UsdSchemaType