NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::IImport_result Class Referenceabstract

This interface represents the result of an import operation. More...

Inheritance diagram for mi::IImport_result:
Inheritance graph
[legend]

Public Member Functions

virtual const char *  get_rootgroup () const =0
  Returns the name of the root group. More...
 
virtual const char *  get_camera_inst () const =0
  Returns the name of the camera instance. More...
 
virtual const char *  get_options () const =0
  Returns the name of the options element. More...
 
virtual Size  get_elements_length () const =0
  Returns the length of the element array. More...
 
virtual const char *  get_element (Size index) const =0
  Returns the name of the element indicated by index. More...
 
virtual Uint32  get_error_number () const =0
  Returns the number of the first error. More...
 
virtual const char *  get_error_message () const =0
  Returns the message of the first error. More...
 
virtual Size  get_messages_length () const =0
  Returns the number of messages. More...
 
virtual Uint32  get_message_number (Size index) const =0
  Returns the message number for a given message from the array of messages. More...
 
virtual const char *  get_message (Size index) const =0
  Returns a message from the array of messages. More...
 
virtual base::Message_severity  get_message_severity (Size index) const =0
  Returns the severity for a given message from the array of messages. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xa47741d4, 0x49c5, 0x418d, 0xa5, 0x4b, 0xa6, 0xfb, 0xf4, 0xa0, 0x91, 0x44 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xa47741d4, 0x49c5, 0x418d, 0xa5, 0x4b, 0xa6, 0xfb, 0xf4, 0xa0, 0x91, 0x44 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

This interface represents the result of an import operation.

Such an import operation is triggered by mi::neuraylib::IImport_api::import_elements() or mi::neuraylib::IImport_api::import_elements_from_string(). It gives access to messages, message numbers, and message severities, and to important scene elements like root group, camera instance, and options. Furthermore you can query the imported element names, if requested during import.

Importers should use the message severities according to the following guidelines:

Member Function Documentation

virtual const char* mi::IImport_result::get_camera_inst ( ) const
pure virtual

Returns the name of the camera instance.

If the scene file has a scene root (like a render statement in a .mi file) containing a camera instance, the method returns the name of the camera instance element.

virtual const char* mi::IImport_result::get_element ( Size  index) const
pure virtual

Returns the name of the element indicated by index.

virtual Size mi::IImport_result::get_elements_length ( ) const
pure virtual

Returns the length of the element array.

virtual const char* mi::IImport_result::get_error_message ( ) const
pure virtual

Returns the message of the first error.

A message describing the error condition corresponding to the error reported from get_error_number().

It is possible to query the all messages, see get_messages_length() and get_message(mi::Size)const. This method just reports the the first message of severity mi::base::MESSAGE_SEVERITY_ERROR or above, or NULL if there is no such message.

virtual Uint32 mi::IImport_result::get_error_number ( ) const
pure virtual

Returns the number of the first error.

The error number indicates the status of the import operation: 0 means success, all other values indicate failures, in which case get_error_message() provides a diagnostic message. Numbers in the range 4000-5999 are reserved for custom importers. All other numbers are reserved for other purposes.

It is possible to query the message numbers of all messages, see get_messages_length() and get_message_number(mi::Size)const. This method just reports the number of the first message of severity mi::base::MESSAGE_SEVERITY_ERROR or above, or 0 if there is no such message.

virtual const char* mi::IImport_result::get_message ( Size  index) const
pure virtual

Returns a message from the array of messages.

See Also
get_messages_length()
virtual Uint32 mi::IImport_result::get_message_number ( Size  index) const
pure virtual

Returns the message number for a given message from the array of messages.

See Also
get_messages_length()
virtual base::Message_severity mi::IImport_result::get_message_severity ( Size  index) const
pure virtual

Returns the severity for a given message from the array of messages.

See Also
get_messages_length()
virtual Size mi::IImport_result::get_messages_length ( ) const
pure virtual

Returns the number of messages.

virtual const char* mi::IImport_result::get_options ( ) const
pure virtual

Returns the name of the options element.

If the scene file has a scene root (like a render statement in a .mi file) containing an options element, the method returns the name of the options element.

virtual const char* mi::IImport_result::get_rootgroup ( ) const
pure virtual

Returns the name of the root group.

If the scene file has a scene root (like a render or root statement in a .mi file), the method returns the name of the root element. For most other files, this is the name of a group that was created by the importer and that contains the top-level scene elements.Returns NULL for .msl, .xmsl, and .mdl files.