neuray API Programmer's Manual

Importer and Exporter

[Neuray API]

Description

Methods to import and to export scene data and MDL modules. All import and export methods use a common naming convention to identify files based on URIs as defined in [RFC3986]. Currently only the URI scheme file is supported. An empty URI scheme defaults to the file scheme. URI authorities are not supported, except for the empty URI authority, which is needed in some cases to resolve ambiguities (see below).

Within the file scheme relative and absolute URI paths are supported (see Section 4 in [RFC3986]). URI paths are mapped to filenames as follows:

  • On Linux and Mac OS, URI paths are treated as filenames paths without any translation.

  • On Windows, slashes in relative URI paths are replaced by backslashes to obtain the filename.

  • On Windows, absolute URI paths are mapped to filenames according to the following table.

URI path

Filename

Comment

/C:/dir1/dir2/file

C:\dir1\dir2\file

-

/C/dir1/dir2/file

C:\dir1\dir2\file

This mapping is supported in addition to the first one since a colon is a reserved character in URIs.

/dir1/dir2/file

\dir1\dir2\file

This mapping is only supported for top-level directory names not consisting of a single letter.

//share/dir1/dir2/file

\\share\dir1\dir2\file

This mapping requires an (otherwise optional) empty URI authority (//) since otherwise the share name is interpreted as URI authority.

In addition, the following variable can be used in URI paths, which are expanded by .

  • "${shader}"

    The URI path may start with the string "${shader}" followed by a slash and a relative path, in which case the relative path is resolved relative to the search path for MDL modules. If several directories for MDL modules have been configured, they are searched in turn. This variable is only supported for import methods, not for export methods.

See also:

The API components mi::neuraylib::IImport_api and mi::neuraylib::IExport_api offer methods to convert between filenames and URIs. The Iray Programmer's Manual describes [:ipmlink scene_file_formats scene file formats] that Iray can import.

Classes

class 
This interface is used to export files. More...
class 
This interface represents the result of an export operation. More...
class 
This interface represents the result of an export operation. More...
class 
Abstract interface for exporters. More...
class 
Abstract base interface common for importers and exporters. More...
class 
This interface represents states that are passed to recursive calls of importers and exporters. More...
class 
This interface is used to import files. More...
class 
This interface represents the result of an import operation. More...
class 
This interface represents the result of an import operation. More...
class 
Abstract interface for importers. More...
class 
A reader supports binary block reads and string-oriented line reads that zero-terminate the result. More...
class 
Base interface for readers and writers. More...
class 
Represents the position in a data stream. More...
class 
A writer supports binary block writes and string-oriented line writes that accept a zero-terminated string as argument. More...

Enumerations

enum mi::neuraylib::Impexp_priority{ IMPEXP_PRIORITY_OVERRIDE = 4, IMPEXP_PRIORITY_WELL_DEFINED = 3, IMPEXP_PRIORITY_AMBIGUOUS = 2, IMPEXP_PRIORITY_GUESS = 1, IMPEXP_PRIORITY_FORCE_32_BIT = 0xffffffffU}
Confidence in capabilities of an importer or exporter. More...

Enums

enum mi::neuraylib::Impexp_priority

Confidence in capabilities of an importer or exporter. If there is more than one importer or exporter that accepts a certain file format, the importer or exporter with the highest confidence is taken.

See also:

mi::neuraylib::IImpexp_base::get_priority()

Enumerator:

IMPEXP_PRIORITY_OVERRIDE = 4
The highest confidence, reserved for importer and exporter from user plugins. An importer or exporter of this priority will always take precedence over all internal importers and exporters.
IMPEXP_PRIORITY_WELL_DEFINED = 3
The highest possible priority for internal importer or exporter. Use only for importer or exporter whose test function cannot fail and whose support for the format is complete.
IMPEXP_PRIORITY_AMBIGUOUS = 2
The test function might fail, or the format might not be fully supported.
IMPEXP_PRIORITY_GUESS = 1
The importer or exporter does not have a good way of detecting the format or the support is very preliminary or incomplete.
IMPEXP_PRIORITY_FORCE_32_BIT = 0xffffffffU