HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdMaterialSchema Class Reference

#include <materialSchema.h>

+ Inheritance diagram for HdMaterialSchema:

Public Member Functions

HD_API HdMaterialNetworkSchema GetMaterialNetwork ()
 
HD_API HdMaterialNetworkSchema GetMaterialNetwork (TfToken const &context)
 
HD_API HdMaterialNetworkSchema GetMaterialNetwork (TfTokenVector const &contexts)
 
- 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 &context)
 
static HD_API TfToken GetLocatorTerminal (HdDataSourceLocator const &locator, TfTokenVector const &contexts)
 
Schema location
static HD_API const TfTokenGetSchemaToken ()
 
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
 

Detailed Description

Definition at line 62 of file materialSchema.h.

Constructor & Destructor Documentation

HdMaterialSchema::HdMaterialSchema ( HdContainerDataSourceHandle  container)
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 68 of file materialSchema.h.

Member Function Documentation

static HD_API HdContainerDataSourceHandle HdMaterialSchema::BuildRetained ( size_t  count,
const TfToken names,
const HdDataSourceBaseHandle *  values 
)
static
static HD_API const HdDataSourceLocator& HdMaterialSchema::GetDefaultLocator ( )
static

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

static HD_API HdMaterialSchema HdMaterialSchema::GetFromParent ( const HdContainerDataSourceHandle &  fromParentContainer)
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 HD_API TfToken HdMaterialSchema::GetLocatorTerminal ( HdDataSourceLocator const &  locator)
static
static HD_API TfToken HdMaterialSchema::GetLocatorTerminal ( HdDataSourceLocator const &  locator,
TfToken const &  context 
)
static
static HD_API TfToken HdMaterialSchema::GetLocatorTerminal ( HdDataSourceLocator const &  locator,
TfTokenVector const &  contexts 
)
static
HD_API HdMaterialNetworkSchema HdMaterialSchema::GetMaterialNetwork ( )

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:

  1. The data flows from left to right.
  2. The lines between "materialOverride" and "interfaceMappings" are not true connections and are not backed by the MaterialConnection schema. Each item within "materialOverride" and "interfaceMappings" is loosely coupled by their matching names.
  3. The connections in the diagram are drawn with an 'o' to indicate the source where the connection was authored, and these connections are backed by the MaterialConnection schema. +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------—+ | |
    "Plastic_Material" [scene index prim name]
    +--------------------------------—+ +-----------------------------------------------------------------------------------------------------------------------------------------------------—+
    | | materialOverride | | material | | | | +---------------------------—+ | | +-----------------------------------------------------------------------------------------------------------------------------------------------—+ | | | | | interfaceValues | | | | ri [materialNetwork for Renderman render context] | | | | | | | | | | +--------------------—+ +-----------------------------------------------------------------------------—+ +----------------—+ | | | | | | *globalVal = 0.2----------—+-+-—+ | | |interfaceMappings | | nodes | |terminals | | | | | | | | | | | | | | | +-----------------—+ | | | | | | | | | *globalSpecularKface = 0.666-+-+-+ +-+–+–+-+*globalVal o--------—+—+ | |"Color_Manipulate" | | +-+-o*surface | | | | | | | | | | | | | | | | |[materialNode] | | | | | | | | | | +---------------------------—+ | +–+-+–+–+-+*globalSpecularKface o-+-+ | | | | | | | | | | | | | | | | | | | +—+-+-*adjustVal *out+-—+ | | +----------------—+ | | | | +--------------------------------—+ | | +--------------------—+ | | | | | | | | | | | | | | | | | +-----------------—+ | +--------------------—+ +-----------------—+ | | | | | | | | | | | | |"MaterialLayer" | |"PxrSurface" | | | | | | | | | | | | | |[materialNode] | |[materialNode] | | | | | | | | | | | | | | | | | | | | | | | | | +-+—+------------------------—+–+–*specularKface *out+–+-o*materialIn *out+-+-+ | | | | | | | | | | | | | | | | | | | | | | | | *diffuseK = 0.12 | | | | | | | | | | | | +-------------------—+ | | | +-----------------—+ | | | | | | | | | |"Color_RetargetLayer" | | | | | | | | | | | | | |[materialNode] | +–+-o*someInput_A | | | | | | | | | | | | | | | | | | | | | +—+-+-*valRemapAmount *out+--—+-o*someInput_B | | | | | | | | | | | | | | | | |
    +-------------------—+ +--------------------—+
    | | | +-----------------------------------------------------------------------------—+ | | | | | | | | | | | +-----------------------------------------------------------------------------------------------------------------------------------------------—+ | | | | | | | +-----------------------------------------------------------------------------------------------------------------------------------------------------—+ | | | +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------—+
HD_API HdMaterialNetworkSchema HdMaterialSchema::GetMaterialNetwork ( TfToken const &  context)
HD_API HdMaterialNetworkSchema HdMaterialSchema::GetMaterialNetwork ( TfTokenVector const &  contexts)
static HD_API const TfToken& HdMaterialSchema::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: