|
HDK
|
#include <materialSchema.h>
Inheritance diagram for HdMaterialSchema:Public Member Functions | |
| HD_API TfTokenVector | GetRenderContexts () const |
| HD_API HdMaterialNetworkSchema | GetMaterialNetwork () const |
| Return the material network schema for the universalRenderContext. More... | |
| HD_API HdMaterialNetworkSchema | GetMaterialNetwork (TfToken const &renderContext) const |
| HD_API HdMaterialNetworkSchema | GetMaterialNetwork (TfTokenVector const &renderContexts) const |
Public Member Functions inherited from HdSchema | |
| HdSchema (HdContainerDataSourceHandle container) | |
| HD_API HdContainerDataSourceHandle | GetContainer () const |
| Returns the container data source that this schema is interpreting. More... | |
| HD_API bool | IsDefined () const |
| operator bool () const | |
Static Public Member Functions | |
| static HD_API TfToken | GetLocatorTerminal (HdDataSourceLocator const &locator) |
| static HD_API TfToken | GetLocatorTerminal (HdDataSourceLocator const &locator, TfToken const &renderContext) |
| static HD_API TfToken | GetLocatorTerminal (HdDataSourceLocator const &locator, TfTokenVector const &Contexts) |
Schema location | |
| static HD_API const TfToken & | GetSchemaToken () |
| static HD_API const HdDataSourceLocator & | GetDefaultLocator () |
Schema construction | |
| static HD_API HdContainerDataSourceHandle | BuildRetained (size_t count, const TfToken *names, const HdDataSourceBaseHandle *values) |
Schema retrieval | |
| HdMaterialSchema (HdContainerDataSourceHandle container) | |
| static HD_API HdMaterialSchema | GetFromParent (const HdContainerDataSourceHandle &fromParentContainer) |
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 |
Protected Attributes inherited from HdSchema | |
| HdContainerDataSourceHandle | _container |
The Material schema is a container schema that provides the correct material definition per render context.
For example, a material may specify several render contexts like the universalRenderContext (""), Renderman ("ri"), Storm ("glslfx"), etc. Each render context will then provide the specific definition for the renderer, which is defined by the MaterialNetwork schema. The universalRenderContext applies to all renderers.
See "Custom Code: Schema Methods" section for ASCII art diagram.
Definition at line 65 of file materialSchema.h.
|
inline |
Retrieves a container data source with the schema's default name token "material" from the parent container and constructs a HdMaterialSchema instance. Because the requested container data source may not exist, the result should be checked with IsDefined() or a bool comparison before use.
Definition at line 71 of file materialSchema.h.
|
static |
|
static |
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container representing this schema is found by default.
|
static |
Retrieves a container data source with the schema's default name token "material" from the parent container and constructs a HdMaterialSchema instance. Because the requested container data source may not exist, the result should be checked with IsDefined() or a bool comparison before use.
|
static |
|
static |
|
static |
| HD_API HdMaterialNetworkSchema HdMaterialSchema::GetMaterialNetwork | ( | ) | const |
Return the material network schema for the universalRenderContext.
| HD_API HdMaterialNetworkSchema HdMaterialSchema::GetMaterialNetwork | ( | TfToken const & | renderContext | ) | const |
Return the material network schema for the given render context.
| HD_API HdMaterialNetworkSchema HdMaterialSchema::GetMaterialNetwork | ( | TfTokenVector const & | renderContexts | ) | const |
Return the first material network schema found among the given list of render contexts, falling back to the universal context if none of the provided contexts are found.
| HD_API TfTokenVector HdMaterialSchema::GetRenderContexts | ( | ) | const |
The following diagram depicts an example scene index prim "Plastic_Material". "Plastic_Material" is a scene index prim that has multiple container data sources, like 'material' (HdMaterialSchema) and 'materialOverride' (HdMaterialOverrideSchema). "Plastic_Material" as a scene index prim also has a scene index prim type, which is type 'material'. (See HdPrimTypeTokens). Note the following:
| "Plastic_Material" [scene index prim name] |
|---|
| +-----------------------------——+ +--------------------------------------------------------------------------------------------------------------------------------------------------——+ |
| +----------------——+ +-----------------——+ | ||||||
|---|---|---|---|---|---|---|
Returns a token where the container representing this schema is found in a container by default.