UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes

Import Class

Header: #include <UnigineImport.h>

Notice
Import System API is not available for Entertainment SDK edition.

This is an import manager class. It is used to create and manage importers, processors as well as to directly import files in non-native formats, if an importer for such files was previously registered.

You can manage the set of available importers dynamically by adding them to or removing from the registry.

You can also get the list of all currently supported file extensions.

Import Class

Members


static ImportPtr create ( )

Import * get( )

Returns a pointer to the Import manager.

Return value

Import manager instance.

void registerImporter( const char * type_name )

Registers a new importer with a given name.

Arguments

  • const char * type_name - Importer type name.

bool unregisterImporter( const char * type_name )

Unregisters the specified importer type.

Arguments

  • const char * type_name - Importer type name.

Return value

true if a given importer type was successfully unregistered; otherwise, false.

Importer * createImporter( const char * type_name )

Creates a new importer of the specified type.
Notice
The importer type name specified must be previously registered.

Arguments

  • const char * type_name - Importer type name.

Return value

Pointer to a new created importer of a given type if it was created successfully; otherwise, nullptr.

Importer * createImporterByFileName( const char * file_name )

Creates an importer for the input file with a given name by its extension, if such an importer was previously registered.

Arguments

  • const char * file_name - Name of the input file containing the data to be imported.

Return value

Pointer to the importer if it was successfully created for the file with a given name; otherwise, nullptr.

void registerImportProcessor( const char * type_name )

Registers a new import processor with a given name.

Arguments

  • const char * type_name - Import processor type name.

bool unregisterImportProcessor( const char * type_name )

Unregisters the specified import processor type.

Arguments

  • const char * type_name - Import processor type name.

Return value

true if a given import processor type was successfully unregistered; otherwise, false.

ImportProcessor * createImportProcessor( const char * type_name )

Creates a new import processor of the specified type.
Notice
The processor type name specified must be previously registered.

Arguments

  • const char * type_name - Import processor type name.

Return value

Pointer to a new created import processor of a given type if it was created successfully; otherwise, nullptr.

bool isSupportedExtension( const char * extension )

Returns a value indicating whether the specified file extension is supported by the importer.

Arguments

  • const char * extension - Null-terminated string with file extension to be checked.

Return value

true if the specified file extension is supported by the importer; otherwise, false.

Vector<String> getSupportedExtensions( )

Returns the list of all supported file extensions as a vector of strings.

Return value

List of all supported extensions as a vector of strings.

void getSupportedExtensions( Vector<String> & extensions )

Returns the list of all supported file extensions and puts it to the given vector.

Arguments

  • Vector<String> & extensions - Vector to put the list of all supported extensions to.

String getImporterTypeByExtension( const char * extension )

Returns the type of importer for the specified extension.

Arguments

  • const char * extension - Null-terminated string with file extension.

Return value

Type of importer for the specified extension if it exists, as a string; otherwise, null string.

void getImporterTypes( Vector<String *> & types )

Returns the list of all importer types registered by the Import Manager and puts it to the given vector.

Arguments

  • Vector<String *> & types - Vector to put the list of all registered importer types to.

Vector<String> getImporterTypes( )

Returns the list of all importer types registered by the Import Manager.

Return value

List of all importer types registered by the Import Manager as a vector of strings.

bool import( const char * filepath, const char * output_path, String & out_filepath )

Imports the contents from the specified input file to the specified output path and puts the path to the resulting output file to out_filepath.

Arguments

  • const char * filepath - Path to an input file containing the data to be imported.
  • const char * output_path - Output path to be used to store generated file(s) with imported data.
  • String & out_filepath - Path to the resulting output file.

Return value

true if the specified input file is imported successfully; otherwise, false.
Last update: 2018-04-13