This page has been translated automatically.
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
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client 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

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

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.

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.

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.

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.

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.

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.

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.

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.

Arguments

  • string type_name - Pre-processor name.

int addPostProcessor(string type_name)

Adds an import post-processor with a given name.

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.

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.

int IMPORT_LIGHTS

Description

Flag indicating that lights are to be imported.

int IMPORT_CAMERAS

Description

Flag indicating that cameras are to be imported.

int IMPORT_MESHES

Description

Flag indicating that meshes are to be imported.

int IMPORT_ANIMATIONS

Description

Flag indicating that animations are to be imported.

int IMPORT_TEXTURES

Description

Flag indicating that textures are to be imported.

int IMPORT_MATERIALS

Description

Flag indicating that materials are to be imported.

int IMPORT_JOINTS

Description

Flag indicating that joints (bones) for animated FBX assets are to be imported.
Last update: 2018-08-10
Build: ()