| Previous Topic (None) | Up (Contents) | Next Topic (None) |
Scripted GUI
Technical Information
Krakatoa for 3ds Max has been designed as a hybrid system:
- The render plug-in, the Particle Flow operators and the core of the PRT Loader object have been implemented in C++ using the 3ds Max SDK.
- The User Interface of the Renderer and the PRT Loader object as well as several additional tools have been implemented using MAXScript, the built-in programming language of 3ds Max.
This structure combines the best characteristics of both worlds - C++ plugins are fast and powerful, but developing User Interfaces for them is a rather slow process, while MAXScript is slower and less powerful, but is perfectly suited for generation of User Interfaces in shortest time.
This also implies that the complete User Interface of the renderer is provided as source code and can be explored and modified by the end user or even completely replaced if desired - the User Interface layer and the actual plug-in renderer communicate through a set of string values stored in the renderer instance that can be defined, get and set via simple MAXScript calls.
When you assign the Krakatoa plug-in renderer in the Render Scene Dialog of 3ds Max, the Renderer tab will contain a single button which lets you open the Scripted GUI of Krakatoa. Pressing this button simply calls the MAXScript function FranticParticleRenderMXS.OpenGUI() which causes the scripted floater containing all Rollouts to open.
Features of the Krakatoa GUI Floater
The scripted GUI uses a Rollout Floater which is a holder of an arbitrary number of rollouts. It provides the following features:
- The Floater will store its last position and size in the renderer, which means that opening the file later will bring up the dialog at the last position used in that scene.
- In addition, the Position of the floater will be stored in the file KrakatoaPreferences.ini saved in the folder ..\Plugcfg\Krakatoa - you can use the Explore Folder... button in the Presets and History rollout to open a Windows Explorer at that location. Look under the [Dialog] category for the Position key.
- If a new instance of the renderer is being assigned (for example when switching from Scanline to Krakatoa), the last position stored in the INI file will be used.
- If the INI file could not be found (either because Krakatoa is being run for the first time or because the INI file has been renamed/moved/deleted), the Floater will open in the center of the main monitor.
- Since desktop resolutions can vary from computer to computer, when positioning the Krakatoa GUI Floater, the requested position will be compared to the current desktop size and if the dialog is outside of the current desktop, it will be adjusted to remain visible. This means that opening a file saved on dual-monitor system where the floater was placed on the second monitor will automatically place it on the single monitor if there is no second monitor. Same applies to placing the floater too far left, top or bottom.
- The Height of the Floater can be changed by dragging its top or bottom border. The Width cannot be changed interactively.
- The Floater will display the Krakatoa Version string in its title bar - for example Krakatoa v1.0.1.29090 - the first digit is the major version number, followed by a minor version number and a build number. The last five digit number is the internal submission ID of the Frantic Films' version control system - each code submission to the system by any product increments this number, thus it can be used to distinguish between multiple builds of the same application even within the same day.
- The Floater can be opened by pressing the Open Scripted GUI button in the Renderer tab of the Render Scene Dialog, but activating the KrakatoaGUI MacroScript which can be placed on a toolbar, menu, quadMenu or assigned to a keyboard shortcut, or by calling the MAXScript function FranticParticleRenderMXS.OpenGUI() from the MAXScript Listener or another script.