#include <materialimport.h>
A MaterialImport defines an import factory of a custom-defined material derived from BaseMaterial. The importer may be called on user-triggered file import operations. An import instance is created for every single material import operation and provided with the parsed material data, e.g. the parameter values that were parsed from FbxProperty types.
The importers are expected to be registered in MaterialImporters under a user-readable name may be used in user dialogs.
An importer can be used in the following manner:
Please note that an importer may not be able to handle the provided type of material and return an error.
Public Member Functions | |
MAXON_METHOD Result< BaseMaterial * > | CreateMaterial (const MaterialExchangeData &materialData, BaseDocument &baseDocument, const DataDictionary &config) |
MAXON_METHOD Result< BaseMaterial * > | CreateMaterial (const MaterialExchangeDataExtended &materialData, BaseDocument &baseDocument, const DataDictionary &config) |
Private Member Functions | |
MAXON_INTERFACE (MaterialImportInterface, MAXON_REFERENCE_NORMAL, "net.maxon.material.interface.materialimport") | |
|
private |
MAXON_METHOD Result<BaseMaterial*> CreateMaterial | ( | const MaterialExchangeData & | materialData, |
BaseDocument & | baseDocument, | ||
const DataDictionary & | config | ||
) |
Creates a material based on the provided material data. Configuration and destination BaseDocument are provided for context. The implementation is free to decide whether to insert the returned material into the document, or not.
[in] | materialData | The material data to import from. |
[in] | baseDocument | The destination scene of the creation. |
[in] | config | The import configuration. |
MAXON_METHOD Result<BaseMaterial*> CreateMaterial | ( | const MaterialExchangeDataExtended & | materialData, |
BaseDocument & | baseDocument, | ||
const DataDictionary & | config | ||
) |
Same but uses MaterialExchangeDataExtended instead of MaterialExchangeData.