This is an old revision of the document!
Table of Contents
Table of Contents
Graphical User Interface
GroIMP is equipped with a modern, configurable graphical user interface. It supports user-defined layouts of panels, including arrangement of panels in tab groups and floating windows. Figure 2.1, “Screenshot of GroIMP” shows a typical screenshot with 3D view.
Figure 2.1. Screenshot of GroIMP
You can see the panels View, Attribute Editor, File Explorer, Text Editor, Toolbar and Statusbar. The panels Images and Materials are hidden, they are arranged together with File Explorer in a tab group. The panel Text Editor is not contained in GroIMP's main window but in its own floating window. Details of these panels will be described in the following.
Panels Handling
Common panel handling
GroIMP's user interface consists of an arrangement of panels, e.g., a 3D view or a text editor. This arrangement can be changed by the user by Drag&Drop: For panels with title bars or panels in a tab group, a Drag&Drop operation is performed by dragging title bars with the mouse. A contour indicates where the panel will be dropped if you release the mouse button. For panels without title bars (e.g., toolbars, statusbars), just drag the panels themselves.
Every panel has a panel menu which provides at least the operations Undock and Close. A panel menu is opened by clicking on the title bar of the panel or, if there is no title bar, on the panel itself (usually with the right mouse button). The Undock operation undocks the panel out of its current location and brings it up in a new floating window, the Close operation closes a panel.
Normally, not all possible panels are actually present in the user interface. However, all panels are accessible through the Panels menu of GroIMP's main window. If a panel you need is missing, just select it in the main Panels menu. This brings up the panel in a new floating window.
The arrangement of all panels is called a panel _layout_. The menu Panels/Set Layout provides a set of predefined layouts which are useful for distinct tasks; the menu item Panels/Add Layout adds the current layout to the list of user-defined layouts of the current project. User-defined layouts are also accessible in the menu Panels/Set Layout.
See more documentation on:
Common panels
File Explorer
GroIMP's File Explorer shows all those files of the project which have an immediate meaning as files to GroIMP. These are source code files, plain text files, HTML files and the like. Files which are used to define non-file-like objects (e.g., images, 3D geometry, data sets) are not shown in the file explorer panel, they are accessible in the panels of the corresponding object type.
Figure 2.2. File Explorer
If the file explorer is not already shown, open the panel via the Panel menu. As you will know it from your system's file browser, GroIMP's file exporer displays files in a tree-like structure. Files may be activated by a double-click or pressing the Enter key: On activation, source code and text files are opened in the text editor, HTML files are shown in GroIMP's integrated browser. At the moment, files cannot be renamed, moved or deleted in the file explorer.
Files which already exist in your file system can be added to a project via the menu item Object/New/Add File. You have the choice to _link_ or _add_ these files: A linked file does not become part of the project, the project just references it in your file systems. Changes to a linked file take effect on the project when GroIMP (re-)opens the file. In contrast to a linked file, an added file is copied into the project, thus, after addition, there is no connection between the original file and the project any more.
In Figure 2.2, “File Explorer”, a file explorer panel is shown. `FTree.rgg` is a source code file, `FTree.txt` a text file which contains some explanations about the project FTree, and `index.md` is a link (indicated by the small arrow at the lower left corner of the icon) to an HTML file.
Text Editor
GroIMP is equipped with a simple internal text editor. When you activate a source code or text file entry in the file explorer, it is opened in the text editor and can be edited. The usual editing operations (Cut&Paste, Undo/Redo, Save) are available. Figure 2.3, “Text Editor” shows a screenshot.
Figure 2.3. Text Editor
For some file types, additional actions are triggered when a file of that type is saved. For example, source code is compiled immediately.
Text Editor jEdit
If the jEdit-Plugin is installed, the jEdit text editor is used instead of GroIMP's simple internal text editor. Figure 2.4, “Text Editor jEdit” shows a screenshot. jEdit supports syntax highlighting and contains various edit, search, and print commands. Comprehensive documentation is available via the Help\-menu of jEdit.
Figure 2.4. Text Editor jEdit
Image Explorer
Every image used within a GroIMP project, e.g., a colouring texture of a 3D material, is shown in the Image Explorer. Its structure is similar to the File Explorer. New images can be added to a project via the menu Object/New: Currently, this menu contains only the item From File which reads an existing image file into the project. All file formats which are supported by your installation of the Java Image I/O Framework are readable, these are at least Portable Network Graphics (`png`), JPEG and Graphics Interchange Format (`gif`). If a format you need is not supported by your installation, see Section “Installation of Plugins for the Java Image I/O Framework”. As for the File Explorer, you have the choice to link or add image files to the project.
Figure 2.5. Image Explorer, Material Explorer, Attribute Editor
Attribute Editor
Another panel which you will encounter often is the attribute editor (Figure 2.5, “Image Explorer, Material Explorer, Attribute Editor”). It is used to edit attributes of a variety of objects: User settings of configuration objects, geometric attributes of scene objects, attributes of resource objects like 3D materials, and others.
Each attribute has a type, and each type brings up specific edit components in the attribute editor. For example, the radius attribute of circles or spheres is a numeric attribute and is editable through a simple input field. The orientation of a cylinder in 3D space is a 3D vector and, thus, it is editable through a set of three numeric input fields. Very complex attributes like 3D materials consist of several subattributes, each of which brings up its own edit components in the attribute editor.
In Figure 2.5, you can see the attribute editor for a 3D material of type Phong. Such a material has the attributes _`Channel Input`_, _`Diffuse Colour`_, _`Transparency`_, _`Interpolated Transparency`_, _`Ambient Colour`_, _`Emissive Colour`_, _`Specular Colour`_ and _`Shininess`_. The Phong material shown has a Checkerboard 2D surface map as its _`Diffuse Colour`_, the checkerboard itself has the attributes _`Channel Input`_, _`Colour 1`_ and _`Colour 2`_. As _`Channel Input`_, an UV-Transformation is chosen, its numeric attributes are editable through the input fields. For angles and other attributes which represent physical quantities, their units are shown, in the this case `deg` which stands for degrees. As _`Colour 1`_, an RGB colour is chosen, whose values are modified by sliders.
_`Colour 2`_ of the checkerboard is set to an image map. One could have chosen an RGB colour as for the first colour, a Checkerboard 2D as for the diffuse colour of the material, a simple constant colour, or some other valid type for this attribute. In GroIMP, there are many attributes whose values may be of a set of different types. For all these attributes, a button is shown in the attribute editor which pops up a menu to choose the desired type. Once a type has been chosen, the attribute value is set to this type, and appropriate edit components are created. They are shown within a minimizable subpanel. To minimize it (and to maximize it later on), click on its upper border where a small button is displayed. For example, the subpanel for the RGB components of the Opacity attribute is minimized in Figure 2.5. A double-click on the upper border maximizes the subpanel and minimizes all other panels.
Preferences
In the Preferences panel, you can configure some options of GroIMP and its plugins, see Figure 2.6, “Preferences Panel (Metal Look & Feel)”.
Figure 2.6. Preferences Panel (Metal Look & Feel)
Options for the Swing User Interface
The group UI Toolkit/Swing UI in the Preferences panel lets you choose the Look & Feel of the Swing user interface and whether window decorations (title bar, borders, etc.) should be provided by Swing or by the native window manager of your system. The set of available Look & Feels depends on your Java and GroIMP installations: GroIMP's binary distribution is bundled with the Kunststoff, Liquid and Tonic Look & Feels, the web page Javootoo provides a rich set of Look & Feels together with instructions how to install them. Figure 2.6, “Preferences Panel (Metal Look & Feel)” displays Java's default Look & Feel, Metal.
If you switch to another Look & Feel in the Preferences panel, the user interface will be redrawn immediately. However, changing the window decorations option only takes effect when a new window is opened. Also, there are Look & Feels which do not support window decorations.
Other Explorer Panels
Besides files and images, a variety of other object kinds is displayed within an explorer panel. For example, Figure 2.5, “Image Explorer, Material Explorer, Attribute Editor” shows the Material Explorer panel. These panels are always similar to the file explorer or the image explorer: Objects are shown in a hierarchical tree-like layout, and new objects are created by the Object/New menu of the panel. The contents in this menu depend on the explorer: The Image Explorer reads in images from files, the Material Explorer allows the creation of new materials of several material types, etc.
Projects Handling
The main entity you work on in GroIMP is the _project_. A project may consist of various parts, e.g., files, source code, a scene (2D, 3D, or other), resource objects like data sets, 3D materials or the like. Several projects can be open at the same time, each in its own main window.
You create a new project by choosing the menu item File/New/Project. Via File/Open, projects can be read from a file. Different file formats are available: GS and GSZ are GroIMP's native project formats, the other formats are imported into a new project.
Saving of a project is done in the File menu too. Here, only GS and GSZ are available as file formats. The GS file format in fact consists of a set of files written in the folder containing the GS file: `graph.xml` contains the scene graph of the project, the folder `META-INF` some meta information about the files, and if there are files included in the project, they will be written in the folder (or subfolders) too. To avoid conflicts between different projects, it is mandatory to use an own folder for each project.
Contrary to the GS file format, the GSZ file format only consists of a single file. This file is actually a file in the common zip-format with special content: It contains all the files which comprise a project in the GS file format in a single zip archive. You can use standard zip tools to examine or even modify its contents.
While working with an open project, there is one difference between projects in GS/GSZ file format: If you modify and save files (e.g., text files) contained in a GS project, they will be written to your file system immediately because the GS file format consists of a set of files in your file system. However, for a GSZ project, these files are written to an internal storage: Your modifications are persistently saved only when the whole project is saved.
Import and Export Data
There are many file type supported in GroIMP. Find the complete list here.
Import a Project
To import a file as project you need to click on file>open…. The list of supported project type is :
- gs
- gsz
- xl
- rgg
- lsy/ssy
- dtd
- mtg
Import an Object in the Graph
To import an object you need to have a project open. Then in object>Insert File will help you select the object you want to import in your project.
An object is imported as a node in your project. It can be added under either the root of the project, or the RGGRoot.
Import an Object in an Explorer
GroIMP also include many repositories for external objects. They usually are manager from explorers. In these explorer you can click on object>new>… to add a new object of the correct type in the explorer.
For instance, for files, withing the file explorer: object>new>Add file will help you select the file you want to add to your project.
MTG
Follow this tutorial on how to import MTG in GroIMP.