In the latest developmental build* I have extended the support for scripting in L3DT. The headline addition is the new scripting user interface (see below), but there has also been several updates to the scripting syntax to make it more powerful and easier to use. Whist scripting does not offer the same level of customisation that is possible via plugins, it is now at the stage where it can do useful stuff. I have included several example scripts in the installation package to demonstrate these capabilities (as discussed further down).
Scripting user interface
The most obvious aspect of these changes is the new scripts menu, as shown below:
From this menu you can access the script manager to load, edit and otherwise manage your scripts. You can also open the included script editor, or select another program to be your preferred script editor. Finally, the lower section of the script menu is the 'quick run' list; to run a script, simply select it from this list.
Script examples
Example scripts are included with the installation package, including:
- Export fractal - for generating and exporting a fractal heightmap.
- Import tile - for importing a sub-region of the heightmap from a file.
- Re-calculate texture area - for re-calculating a sub-region of the texture map (e.g. after changes to the attributes map).
Supported languages
By default, this scripting interface only supports L3DT's native script language, ZeoScript. This is a rudimentary home-baked language that is good for calling plugin API extension functions (e.g. calculations, file export, etc.), but not much else. It doesn't do loops, for instance.
For users who want more power from their scripting language, I recommend they download and install Carl Douglas' cdPython plugin, which implements the Python scripting language. L3DT's script interface will run python scripts (.py) after the plugin is installed, and I have included a python script example in the installation package.
Other languages can be added in the future via plugins.
Changes to plugins
This release includes a major revision of the parser in the ZeoScript plugin, which made a few (necessary, and beneficial) breaking changes to the syntax of the language. As a consequence of this change, several plugins that ran scripts had to be modified. The change list so far includes:
- Sapphire (3D editor)
- L3DTio_Atlas2 (TGEA Atlas export plugin)
- L3DTio_Spring (Spring RTS export plugin)
- L3DTio_SMT (Spring RTS export helper plugin)
- L3DTio_SMF (Spring RTS export helper plugin)
- L3DTio_Backup (backup/restore/undo plugin)
- 7zWrap (7-Zip compression/decompression plugin)
- atMergeMap (heightfield-combining plugin)
In other news...
- There is a new georeferencing plugin.
- We're thinking about re-starting the famed Image of the Month Competition. Are there any takers? (if so, please reply here).
Feedback
Please reply to this forum thread if you'd like to post comments or questions. Feedback is always welcome.
Cheerio,
Aaron.
* For the record, the latest build version is build 2.5.4.3, dated 9th of June '08.