User Manual: File Panel

Updated for release version: 1.0.3-alpha

This page introduces the File Panel, which provides a standard GUI for loading and writing model objects to specific data formats.

Introduction

The intention of the File Panel is to provide a single, simple interface panel through which all loading from and writing to persistent storage can be performed. The possible formats are defined in the init file as I/O Types, and each I/O type has either a loader or a writer associated with it, as well as (optionally) an dialog box through which to specify options.

Loading Data

Data can be loaded into the modelGUI workspace or environment using a few steps:

  1. Select the desired I/O type from the "File type" drop-down box.
  2. If necessary, click the "Options" button, which will call up a dialog box associated with the file type, which allows you to specify input options. For example, a shape loader will allow you to minimally specify the Shape Set into which the shape will be loaded. If no dialog box appears, this is because no options are available for the specified I/O type.
  3. Click "Browse" and find the input file.
  4. Click "Read Data" to load the data into mgui.

Writing Data

The process for writing data is essentially the same:

  1. Select the desired I/O type from the "File type" drop-down box.
  2. Click the "Options" button, which will allow you to specify which objects you want to write, amongst other possible options. Unlike above, this button must always be used, since you always need to tell the writer what you wish to write.
  3. Click "Browse" and specify the output file or folder.
  4. Click "Write Data" to write the object(s) to file.

I/O Types

An I/O type is specified in the init file with the command "loadIOType", which is of the form:

loadIOType <type name> <input | output> <full loader class name> <full dialog box class name | null> <full options class name | null> <File filter description> <list of file filter extensions>

For the Shape Model writer, this looks like:

loadIOType ShapeModel3D_out output mgui.io.domestic.shapes.ShapeModel3DWriter mgui.io.domestic.shapes.ShapeModel3DOutputDialog mgui.io.domestic.shapes.ShapeModel3DOutputOptions "Shape models (*.smod, *.xml)" smod xml

On the File Panel, you will find a list of all the loaded I/O loaders and writers in the corresponding "File format" drop-down box. Loading or writing to a data file can be done simply by selecting the appropriate format, as is described in the next section.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License