Node Export Plugin
Node Export is a UnigineEditor plugin designed for exporting assets from one project into another. The assets include:
- Nodes
- Meshes
- Textures
- Materials
- Properties
- Terrains
The plugin provides the following functionality:
- Automatic correction of paths in the exported *.node, *.mat and *.prop files that refer to the source project.
- Adding the exported materials and properties to the required materials' libraries without deleting the materials and properties that already exist.
- Copying all dependencies of each node in the selection(e.g. all of the nodes of the selected WorldCluster will be exported with the meshes, materials, textures, etc.).
Loading Plugin
To load the Node Export plugin, open the Tools -> Plugins tab in the UnigineEditor, press the Core button and choose tools/node_export.cpp in the list.
When the plugin is loaded, the icon will appear at the left side of the application window under the Interface panel.
From | Contains a path to a source project, from which the assets will be copied. Includes the following field:
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
To | Contains paths to a target project, into which the assets will be copied. Includes the following fields:
|
||||||||||||
Custom paths | Switches export modes:
|
||||||||||||
Paths | Paths to the target project assets of each category.
|
Exporting Assets
Using the Source Project Structure
In this mode, the target project should have the same folder structure as the source one. This mode should be used to export the large number of assets with lots of dependencies.
- In the Nodes panel of the UnigineEditor, select all of the nodes that need to be exported
- In the From group box, specify a relative path to the project, from which the assets should be exported:
- In the Data edit line of the To group box, specify the full path to the data folder of the target project, to which the assets should be exported.
- In the Project edit line of the To group box, specify a relative path to the target project and click the Export button.
- In the Save Node dialog window that opens, choose the folder to save the selected nodes and click Ok.
Using the Target Project Structure
In this mode, the target project has the folder structure that differs from the structure of the source project. This mode should be used for exporting the assets without dependencies (e.g. ObjectMesh, ObjectGrass, etc.).
- In the Nodes panel of the UnigineEditor, select all of the nodes that need to be exported.
- Specify the paths to the source and target projects as described above.
- Check the Custom paths check box.
- Specify all of the required paths to the folders with the corresponding assets and click the Export button.
- In the Save Node dialog window that opens, choose the folder to save the selected nodes and click Ok.
Usage Example
To demonstrate usage of the Node Export plugin, lets export the assets of the D:/my_first_project/data/demos/src_project/ project to the D:/my_project/data/dest_project/ project that has a custom folder structure.
The assets of the source project are stored as follows:
- materials
- meshes
- buildings
- vegetation
- vehicles
- nodes
- buildings
- vegetation
- vehicles
- properties
- textures
- buildings
- vegetation
- vehicles
To export the assets, perform the following:
- Load the Node Export plugin
- Select the nodes that should be exported in the Nodes panel.
- Specify the demos/src_project in the edit line of the From group box.
- Specify the full path to the data folder of the target project.
- Specify the relative path to the target project:
- Check the Custom paths check box and specify the relative paths for each type of the assets:
- Click the Export button and choose the folder to save the selected nodes.
After exporting the assets, the target project D:/my_project/data/dest_project/ will have the following structure of the folders:
- buildings
- materials
- meshes
- nodes
- textures