neuray API Programmer's Manual

mi::neuraylib::IMdl_discovery_api Class Reference


Interface for the discovery API. The discovery API offers functionality to find MDL content in the registered MDL search paths. These search paths have to be declared with the function call mi::neuraylib::IMdl_compiler::add_module_path() in advance. The ordering of the search paths results from the ordering of the registration and is taken into account during the discovery process.

The MDL modules and packages found inside a search path are assembled into a graph structure consisting of package and module nodes. The discovery results of multiple search paths are merged to one result graph. If a module is found, but there exists already a module with the same qualified name in a previously discovered graph, the additional module will be handled as a shadow of the existing module. Multiple packages with the same qualified name will be merged into one package.

The discovery API works for both MDL files (.mdl) and MDL archive files (.mdr). Archives have to be installed in the top level of the search paths, but material files can be placed anywhere across the sub-folders of a search path.

The result of a discovery process is provided as an mi::neuraylib::IMdl_discovery_result. This data structure provides information about the discovered search paths as well as access to the result graph structure.

Public Member Functions

virtual const IMdl_discovery_resultdiscover( Uint32 filter = static_cast< Uint32 >(IMdl_info::DK_ALL)) const =0
Returns the file system and archive discovery result. More...

Member Functions

virtual const IMdl_discovery_result* mi::​neuraylib::​IMdl_discovery_api::discover( Uint32 filter = static_cast< Uint32 >(IMdl_info::DK_ALL)) const [pure virtual]

Returns the file system and archive discovery result.


Bitmask, that can be used to specify which discovery kinds to include in the result (see mi::neuraylib::IMdl_info::Kind). By default, all kinds are included.