MaterialExportInterface Class Reference

#include <materialexport.h>

Inheritance diagram for MaterialExportInterface:

Public Member Functions

MAXON_METHOD Result< void > Initialize (const BaseMaterial &baseMaterial, const DataDictionary &config)
 
MAXON_METHOD Result< Tuple< Id, DataDictionary > > GetParameters ()
 
MAXON_METHOD Result< HashMap< Id, Data > > GetTextures (const HashSet< Id > &texturedChannels)
 

Static Public Member Functions

static MAXON_METHOD Result< MaterialExchangeDataExport (const BaseMaterial &baseMaterial, const DataDictionary &config)
 

Private Member Functions

 MAXON_INTERFACE (MaterialExportInterface, MAXON_REFERENCE_NORMAL, "net.maxon.material.interface.materialexport")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( MaterialExportInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.material.interface.materialexport"   
)
private

◆ Export()

static MAXON_METHOD Result<MaterialExchangeData> Export ( const BaseMaterial baseMaterial,
const DataDictionary &  config 
)
static

Helper function that perform a lookup of a matching entry in the MaterialExporters registry. After instantiation of the compatible exporter, the multi-stage process is interleaved with data handover to a compatible MaterialMapping instance if required. Note that mappings are not chained.

Parameters
[in]baseMaterialThe material to be exported.
[in]configThe export configuration.
Returns
The exported material data on success.

◆ Initialize()

MAXON_METHOD Result<void> Initialize ( const BaseMaterial baseMaterial,
const DataDictionary &  config 
)

Initialized the export operation by providing the BaseMaterial and export configuration.

Parameters
[in]baseMaterialThe material to be exported.
[in]configThe export configuration.
Returns
OK on success.

◆ GetParameters()

MAXON_METHOD Result<Tuple<Id, DataDictionary> > GetParameters ( )

Returns the constant-values parameters along with markings of whether they require texture representation in order to request texture baking in the GetTextures() stage. Returned parameters are expected to be of type maxon::material::PackedConstantParameter().

Returns
The material parameters on success.

◆ GetTextures()

MAXON_METHOD Result<HashMap<Id, Data> > GetTextures ( const HashSet< Id > &  texturedChannels)

Creates textures for the provided parameters. The textures may be texture buffers, image references or substance references.

Parameters
[in]texturedChannelsThe parameters for which textures are requested.
Returns
The textures on success.