This example provides a good starting point for writing your own importer/exporter using the Softimage C++ API.  The example shows how to create a user interface for a typical import/export application, export geometry using the CGeometryAccessor class, and import polygon meshes using the CMeshBuilder class.

Example Files


Running the Example

To run the example

  1. On the main Softimage menubar, click Demo Tool > Import Export Demo.
  2. To export geometry information and cluster properties, select a polygon mesh object and click Export. Note that you can subdivide the exported geometry if you want. The data is exported to the text file specified in the text box.

  3. To import a file, type the name of the file in the text box in the Import group, and then click Import Polygons to import a mesh with quads, or Import Triangles to import a mesh with triangles. The chunk size allows you to optimize the memory allocation when importing large sets of polygon mesh data.


Building the C++ Example

Softimage SDK includes a compiled version of ImportExport. If you want to modify the code, you can rebuild the example by following these instructions.

To build the example on Windows

  1. Open an Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from an Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the ImportExport project from the command line, type:

    devenv ImportExport.vcproj
  2. In Visual Studio .NET, open the project file ImportExport.vcproj.
  3. Select a configuration (Win32 Release or Win32 Debug) and build the DLL.

To build the example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:



This example uses the following keywords:

C++ example, import, export, mesh, polygons, vertex, vertices, CMeshFileReader, CMeshBuilder, ProgressBar, IsCancelPressed, GetUIToolkit, GotoSection, EndSection, GetLongValues, AddPolygons, AddVertices, PolygonMesh, CErrorDescriptor, CustomProperty, AddProperty, GetParameters, AddParameter, PPGItem, PutLabelMinPixels, PutLabelPercentage, AddEnumControl, AddButton, PutAttribute, AddGroup, AddRow, EndGroup, EndRow, PPGEvent, callback, PPGEventContext,GetAttribute, Button, GetParameterValue, ExecuteCommand, Menu, MenuItem, AddCallbackItem, XSILoadPlugin, RegisterCommand, RegisterMenu, siMenuMainTopLevelID, RegisterProperty