Open Search
    NodeMaterialExportInterface Class Reference

    #include <nodematerialexchange.h>

    Inheritance diagram for NodeMaterialExportInterface:

    Detailed Description

    Please see maxon::material::MaterialExport in "maxon/material/materialexport.h" for related information. A MaterialExport defines the data provider of node space for material export operations. If no exporter is defined, a fallback is performed that the MaterialExchangeInterface to create a textured material of type maxon::NODESPACE::EXCHANGE::BUNDLE::VIEWPORTMATERIAL. Then, a material mapping to the requested target type is performed.

    Public Member Functions

    MAXON_METHOD Result< void > Initialize (NodesGraphModelRef &graph, BaseDocument &baseDocument, const DataDictionary &config)
     
    MAXON_METHOD Result< Tuple< Id, DataDictionary > > GetParameters ()
     
    MAXON_METHOD Result< HashMap< Id, Data > > GetTextures (const HashSet< Id > &texturedChannels)
     

    Private Member Functions

     MAXON_INTERFACE (NodeMaterialExportInterface, MAXON_REFERENCE_NORMAL, "net.maxon.nodes.interface.nodematerialexport")
     

    Member Function Documentation

    ◆ MAXON_INTERFACE()

    MAXON_INTERFACE ( NodeMaterialExportInterface  ,
    MAXON_REFERENCE_NORMAL  ,
    "net.maxon.nodes.interface.nodematerialexport"   
    )
    private

    ◆ Initialize()

    MAXON_METHOD Result<void> Initialize ( NodesGraphModelRef &  graph,
    BaseDocument baseDocument,
    const DataDictionary &  config 
    )

    Initialized the export operation by providing the node graph that should be exported and the BaseDocument and export configuration for context.

    Parameters
    [in]graphThe node graph to be exported.
    [in]baseDocumentThe document in which the node graph lives.
    [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.