• jan@cosmigo.com

PureBasic Plugins Boilerplates Project


#1

Some updates on the PureBasic plugins interface for Pro Motion NG…

Today I’ve published the first proof of concept plugin demo, the “FAKE plugin”, and a developers’ module to add an easy to use logger window to plugins.

This is the first publicly available working demo for the PureBasic file I/O boilerplate. A link to the precompiled DLL can be found below.

So, the plugins interface project is going ahead, albeit slowly.

The FAKE Plugin

The plugin simulates saving images to a fake file format (ext. “.fake”) and demonstrates how to use the logger module for debugging the plugin functions calls.

At Pro Motion launch time, when the FAKE Plugin is registered/initialized, it adds a floating logger window that will persist for the whole session, providing debug info about the plugin calls and data exchanges:

screenshot log window

The plugin also adds a new fake file format to the save/export dialogs:

screenshot fake save

When saving/exporting to the FAKE format no actual images are saved to disk. Instead, all the functions calls to the plugin DLL are logged in the plugin logging window.

This plugin was intended both as a practical example on how to use the PureBasic file I/O boilerplate, as well as an experimental learning tool for plugins developers, to study the order of functions calls associated with each operation in the PM user interface, and to track the details of data exchanges between PM and its plugins.

Those who don’t have PureBasic to compile the plugin can download it from a Google Drive folder I’ve setup appositly:

The Logger Module

This module provides file I/O plugins with a logger window that can be used to debug internal states and events during plugin development. The module exposes a few simple procedure to control the logger and print text to it.

It’s very useful during the development stages of a plugin, and it can also aid learning which plugin functions are called by certain users actions, and in which order.