This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine 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
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Importer Class

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

This class is used to manage a file importer. File importers are used by the Engine's import system to bring the data stored in various non-native formats to UNIGINE. Each importer can be used to import multiple file formats, but there shouldn't be two or more importers registered for a single file format.

Importer Class

Members


int containsParameter ( string name ) #

Returns a value indicating whether the list of import parameters includes a parameter with a given name.

Arguments

  • string name - Parameter name.

Return value

1 if the list of import parameters includes a parameter with a given name; otherwise, 0.

void setParameterInt ( string name, int v ) #

Sets a new value for the specified integer parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • string name - Name of the integer parameter.
  • int v - New value to be set.

int getParameterInt ( string name ) #

Returns the current value of the specified integer parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • string name - Name of the integer parameter.

Return value

Value of the integer parameter.

void setParameterFloat ( string name, float v ) #

Sets a new value for the specified float parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • string name - Name of the float parameter.
  • float v - New value to be set.

float getParameterFloat ( string name ) #

Returns the current value of the specified float parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • string name - Name of the float parameter.

Return value

Value of the float parameter.

void setParameterDouble ( string name, double v ) #

Sets a new value for the specified double parameter.

Arguments

  • string name - Name of the double parameter.
  • double v - New value to be set.

double getParameterDouble ( string name ) #

Returns the current value of the specified double parameter.

Arguments

  • string name - Name of the double parameter.

Return value

Value of the double parameter.

void setParameterString ( string name, string v ) #

Sets a new value for the specified string parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • string name - Name of the string parameter.
  • string v - New value to be set.

string getParameterString ( string name ) #

Returns the current value of the specified string parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • string name - Name of the string parameter.

Return value

Value of the string parameter.

int addPreProcessor ( string type_name ) #

Adds an import pre-processor with a given name. There are built-in pre-processors that can also be added to custom importers.

Arguments

  • string type_name - Pre-processor name.

Return value

1 if the specified import pre-processor is successfully added; otherwise, 0.

void removePreProcessor ( string type_name ) #

Removes an import pre-processor with a given name. There are built-in pre-processors that can also be added to custom importers.

Arguments

  • string type_name - Pre-processor name.

int addPostProcessor ( string type_name ) #

Adds an import post-processor with a given name. There are built-in post-processors that can also be added to custom importers.

Arguments

  • string type_name - Post-processor name.

Return value

1 if the specified import post-processor is successfully added; otherwise, 0.

void removePostProcessor ( string type_name ) #

Removes an import post-processor with a given name. There are built-in post-processors that can also be added to custom importers.

Arguments

  • string type_name - Post-processor name.

void setAnimationsProcessor ( string type_name ) #

Sets the specified processor to be used for importing animations.

Arguments

  • string type_name - Name of the animations processor to be set.

void setCamerasProcessor ( string type_name ) #

Sets the specified processor to be used for importing cameras.

Arguments

  • string type_name - Name of the cameras processor to be set.

void setLightsProcessor ( string type_name ) #

Sets the specified processor to be used for importing lights.

Arguments

  • string type_name - Name of the lights processor to be set.

void setMaterialsProcessor ( string type_name ) #

Sets the specified processor to be used for importing materials.

Arguments

  • string type_name - Name of the materials processor to be set.

void setMeshesProcessor ( string type_name ) #

Sets the specified processor to be used for importing meshes.

Arguments

  • string type_name - Name of the meshes processor to be set.

void setNodesProcessor ( string type_name ) #

Sets the specified processor to be used for importing nodes.

Arguments

  • string type_name - Name of the nodes processor to be set.

void setTexturesProcessor ( string type_name ) #

Sets the specified processor to be used for importing textures.

Arguments

  • string type_name - Name of the textures processor to be set.

int init ( string filepath, int flags ) #

Initializes the importer for the specified file using the given flags. Import flags specify which scene components are to be imported.

Arguments

  • string filepath - Path to a file to be imported.
  • int flags - Set of import flags. Any combination of IMPORT_* flags, or ~0 to set all of them.

Return value

1 if the importer was initialized successfully; otherwise, 0.

int import ( const char * output_path ) #

Imports the contents of the input file to the specified output path.

Arguments

  • const char * output_path - Output path.

Return value

1 if the contents of the input file are successfully imported to the specified output path; otherwise, 0.

string getOutputFilepath ( ) #

Returns the resulting output file path for imported scene component(s). In case if a set of files were generated the path to resulting *.node file will be returned.

Return value

Output file path.
Last update: 2020-07-31
Build: ()