Loading...
Searching...
No Matches
UsdImagingMaterialBindingsSchema Class Reference

The UsdImagingMaterialBindingsSchema specifies a container for all the material bindings declared on a prim. More...

#include <materialBindingsSchema.h>

+ Inheritance diagram for UsdImagingMaterialBindingsSchema:

Public Member Functions

USDIMAGING_API TfTokenVector GetPurposes () const
 Returns the purposes for which bindings may be available.
 
USDIMAGING_API UsdImagingMaterialBindingVectorSchema GetMaterialBindings () const
 Returns the bindings for 'allPurpose'.
 
USDIMAGING_API UsdImagingMaterialBindingVectorSchema GetMaterialBindings (const TfToken &purpose) const
 Returns the bindings for the given purpose.
 
- Public Member Functions inherited from HdSchema
 HdSchema (HdContainerDataSourceHandle container)
 
HD_API HdContainerDataSourceHandle GetContainer () const
 Returns the container data source that this schema is interpreting.
 
HD_API bool IsDefined () const
 
 operator bool () const
 Returns true if this schema is applied on top of a non-null container.
 

Static Public Member Functions

Schema location
static USDIMAGING_API const TfTokenGetSchemaToken ()
 Returns a token where the container representing this schema is found in a container by default.
 
static USDIMAGING_API const HdDataSourceLocatorGetDefaultLocator ()
 Returns an HdDataSourceLocator (relative to the prim-level data source) where the container representing this schema is found by default.
 

Schema retrieval

 UsdImagingMaterialBindingsSchema (HdContainerDataSourceHandle container)
 
static USDIMAGING_API UsdImagingMaterialBindingsSchema GetFromParent (const HdContainerDataSourceHandle &fromParentContainer)
 Retrieves a container data source with the schema's default name token "usdMaterialBindings" from the parent container and constructs a UsdImagingMaterialBindingsSchema instance.
 

Additional Inherited Members

- Public Types inherited from HdSchema
using UnderlyingDataSource = HdContainerDataSource
 
- Protected Member Functions inherited from HdSchema
template<typename T >
T::Handle _GetTypedDataSource (TfToken name) const
 Returns a datasource of the requested type for the given name: schema implementations can use this to ask for child containers, sampled values, vectors, etc.
 
- Protected Attributes inherited from HdSchema
HdContainerDataSourceHandle _container
 

Detailed Description

The UsdImagingMaterialBindingsSchema specifies a container for all the material bindings declared on a prim.

The material binding purpose serves as the key, with the value being a vector of UsdImagingMaterialBindingSchema. While one entry (element) would suffice for a prim's material bindings opinion, we use a vector for aggregating ancestor material bindings to model the inheritance semantics of UsdShadeMaterialBindingAPI.

Definition at line 56 of file materialBindingsSchema.h.

Constructor & Destructor Documentation

◆ UsdImagingMaterialBindingsSchema()

UsdImagingMaterialBindingsSchema ( HdContainerDataSourceHandle  container)
inline

Definition at line 62 of file materialBindingsSchema.h.

Member Function Documentation

◆ GetDefaultLocator()

static USDIMAGING_API const HdDataSourceLocator & GetDefaultLocator ( )
static

Returns an HdDataSourceLocator (relative to the prim-level data source) where the container representing this schema is found by default.

◆ GetFromParent()

static USDIMAGING_API UsdImagingMaterialBindingsSchema GetFromParent ( const HdContainerDataSourceHandle &  fromParentContainer)
static

Retrieves a container data source with the schema's default name token "usdMaterialBindings" from the parent container and constructs a UsdImagingMaterialBindingsSchema instance.

Because the requested container data source may not exist, the result should be checked with IsDefined() or a bool comparison before use.

◆ GetMaterialBindings() [1/2]

USDIMAGING_API UsdImagingMaterialBindingVectorSchema GetMaterialBindings ( ) const

Returns the bindings for 'allPurpose'.

◆ GetMaterialBindings() [2/2]

USDIMAGING_API UsdImagingMaterialBindingVectorSchema GetMaterialBindings ( const TfToken purpose) const

Returns the bindings for the given purpose.

◆ GetPurposes()

USDIMAGING_API TfTokenVector GetPurposes ( ) const

Returns the purposes for which bindings may be available.

Note
This API is preferable to schema.GetContainer()->GetNames().

◆ GetSchemaToken()

static USDIMAGING_API const TfToken & GetSchemaToken ( )
static

Returns a token where the container representing this schema is found in a container by default.


The documentation for this class was generated from the following file: