Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

Behind the scenes

Adding plug-ins to Vectornation by Zaweba

Plug-ins for Vectornation by Zaweba are sandboxed folders with a manifest.json, as a filter, effect, exporter or importer, managed in File > Plug-ins.

Adding plug-ins to Vectornation by Zaweba

No app does everything, and the odd job always turns up that the built in tools do not quite cover. Plug-ins are how Vectornation by Zaweba leaves room for those jobs. A plug-in is a folder with a manifest.json that says what it is, and it runs sandboxed, kept apart from the rest of the app and your computer.

Each plug-in is one of four kinds: a filter, an effect, an exporter or an importer. File > Plug-ins lists what is installed, reloads them, and opens the plug-ins folder.

The four kinds

A filter works on the artwork in front of you, the kind of plug-in for a new way of changing shapes or colours.

An effect is the kind for a new look applied to artwork, alongside the many effects the app already has.

An exporter writes the drawing out in a format of its own. If a cutting machine, a game engine or an in house system wants a file in a particular shape, an exporter can produce it.

An importer reads a format into the app, so files from some other tool can be opened.

Folders and the manifest

Each plug-in lives in its own folder. Inside, manifest.json tells Vectornation the plug-in's kind and other details it needs. Keeping each plug-in in a separate folder makes it easy to add and remove them: copy a folder in to install, delete it to uninstall.

File > Plug-ins opens the folder for you, so you do not have to find it on disk.

Why sandboxing matters

A plug-in is code, and code from someone else deserves care. Running plug-ins in a sandbox limits what they can reach. That makes it more reasonable to try a plug-in shared by a colleague or found online, though it is still sensible to use plug-ins from people you trust.

Reloading while you work

If you are writing a plug-in, the Reload command in File > Plug-ins picks up changes without restarting the app. Edit the code, reload, try it again. That short loop makes developing a plug-in much less tedious.

Plug-ins, scripts and actions

Vectornation has three ways to extend or automate it, and each suits a different need. Actions record steps you do by hand and play them back, which needs no programming. Scripts are JavaScript files in Documents\Zaweba\Vectornation\Scripts, run from File > Scripts over the command registry, and each run is one undo step. Plug-ins go further, adding new filters, effects and file formats that sit inside the app.

As a rough guide, record an action for a repeated sequence of menu steps, write a script for a one off task that needs a little logic, and build a plug-in when you want a new capability that feels like part of the app.

Tips for using plug-ins well

Keep a note of where each plug-in came from and what it is for. After a few months a folder of unnamed plug-ins becomes a puzzle.

Try a new plug-in on a copy of a drawing first. Undo is there, but testing on a copy removes any worry.

When something behaves oddly, open the Plug-ins list and check what is loaded. Removing a recently added plug-in is a quick test of whether it is the cause.