Abstract interface for MDL distiller plugins. More...
#include <mdl_distiller_plugin.h>
Public Member Functions | |
virtual const char * | get_name () const =0 |
Returns the name of the plugin. More... | |
virtual mi::Size | get_api_version () const =0 |
Return the distiller plugin API version. More... | |
virtual bool | init (mi::base::ILogger *logger)=0 |
Initializes the plugin. More... | |
virtual bool | exit ()=0 |
De-initializes the plugin. More... | |
virtual mi::Size | get_target_count () const =0 |
Returns the number of available distilling targets. More... | |
virtual const char * | get_target_name (mi::Size index) const =0 |
Returns the name of the distilling target at index position. More... | |
virtual const mi::mdl::IMaterial_instance * | distill (mi::mdl::IDistiller_plugin_api &api, mi::mdl::IRule_matcher_event *event_handler, const mi::mdl::IMaterial_instance *material_instance, mi::Size target_index, Distiller_options *options, mi::Sint32 *p_error) const =0 |
Main function to distill an MDL material. More... | |
virtual mi::Size | get_required_module_count (mi::Size target_index) const =0 |
Returns the number of modules that are required by result materials of this Distiller plugin. More... | |
virtual const char * | get_required_module_code (mi::Size target_index, mi::Size module_index) const =0 |
Returns the MDL source code of the required module at the given index. More... | |
virtual const char * | get_required_module_name (mi::Size target_index, mi::Size module_index) const =0 |
Returns the fully qualified name of the required module at the given index. More... | |
Public Member Functions inherited from mi::base::Plugin | |
virtual Sint32 | get_plugin_system_version () const |
Returns the version of the plugin system used to compile this. More... | |
virtual const char * | get_name () const =0 |
Returns the name of the plugin. More... | |
virtual const char * | get_type () const =0 |
Returns the type of the plugin. More... | |
virtual Sint32 | get_version () const |
Returns the version number of the plugin. More... | |
virtual const char * | get_compiler () const |
Returns the compiler used to compile the plugin. More... | |
virtual void | release ()=0 |
Destroys the plugin instance. More... | |
virtual const char * | get_string_property (Sint32 index, const char **value) |
Returns a plugin property. More... | |
Abstract interface for MDL distiller plugins.
|
pure virtual |
Main function to distill an MDL material.
Uses a DAG material instance as input, applies selected rule sets and returns the result as a new DAG material instance. The mdl module ::nvidia::distilling_support is loaded before calling this function.
api | The MDL distiller plugin API to manipulate the DAG, and also the API against which the mdltlc generates code |
event_handler | If non-NULL, an event handler interface used to report events during processing. |
material_instance | The material instance to "distill". |
target_index | The index of the distilling target model |
options | The Distiller options |
p_error | An optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
|
NULL
in case of failure.
|
pure virtual |
De-initializes the plugin.
true
in case of success, and false
otherwise.
|
pure virtual |
Return the distiller plugin API version.
A plugin is only accepted if it is compiled against the same API version than the SDK.
|
pure virtual |
Returns the name of the plugin.
Implements mi::base::Plugin.
|
pure virtual |
Returns the MDL source code of the required module at the given index.
This can be used to load the module, also using the corresponding module name (see get_required_module_name()).
target_index | The index of the distilling target model. |
module_index | The index of the module for the target model. |
|
pure virtual |
Returns the number of modules that are required by result materials of this Distiller plugin.
target_index | The index of the distilling target model. |
|
pure virtual |
Returns the fully qualified name of the required module at the given index.
This can be used to load the module, using the corresponding module code (see get_required_module_code()).
target_index | The index of the distilling target model. |
module_index | The index of the module for the target model. |
|
pure virtual |
Returns the number of available distilling targets.
|
pure virtual |
Returns the name of the distilling target at index position.
|
pure virtual |
Initializes the plugin.
true
in case of success, and false
otherwise.