Ligamen

Extensions

Plugins

Plugins add features to Ligamen Studio without changing the editor itself: an extra panel, a command with its own key, a drawing layer over the viewport, or a tool that an AI assistant can call. A plugin is a folder with a small description file and some Python code. This article shows where plugins live, how to turn one on and what its permission dialog means, what a plugin can do through the plugin interface, and how the reference plugin Ghosting is built. Plugins that are only a single script are covered in Scripting.

Where plugins live#

Every plugin is a subfolder of the plugins folder of the application, which is kept outside your projects because a plugin belongs to the machine and not to a .ligamen file. On macOS it is ~/Library/Application Support/Ligamen/plugins/. The Plugins page of Settings shows the exact path at the bottom, as Folder:. A folder counts as a plugin only if it contains a manifest.json, so stray folders are ignored.

To install a plugin, copy its folder into the plugins folder and press Refresh on the Plugins page. To remove it, turn it off and delete the folder.

Turning a plugin on#

Open Settings and the Plugins tab. Each plugin is a row with a checkbox, its name and version, and a status. The status is one of Loaded, Disabled, Blocked and Error. Loaded means that the plugin's code was imported and its register function ran without an error. A plugin that failed shows Error, and the line under the list gives the reason. A row Manifest error points to a folder whose manifest.json is malformed. The editor keeps working in either case: one broken plugin never takes the others down.

Tick the checkbox to enable a plugin. The first time, Ligamen asks Enable plugin and lists what the plugin declares it wants: Filesystem (none, project or full), Network (none, a list of domains or any domain), Devices (camera, microphone), Run other programs and Autoload on startup. Read it before you answer Yes. The dialog states the limit of this protection plainly: the permissions are not enforced yet, so a plugin that ignores them can do more than it declared. Install only plugins from authors you trust. Info opens a dialog with the plugin's id, entry point, dependencies and folder, and Refresh rescans the folder.

The manifest#

manifest.json has two required fields, name and version, and a few optional ones.

{
  "name": "Ghosting",
  "version": "1.0.0",
  "entryPoint": "plugin",
  "description": "Onion-skin: silhouettes of nearby frames."
}

entryPoint is the Python module beside the manifest that holds the code, plugin by default. dependencies lists other plugins that must load first. permissions is an object with the keys filesystem, network, autoload, camera, microphone and subprocess. A manifest without permissions is treated as asking for nothing.

What a plugin can do#

The entry module defines register(api) and, to clean up, unregister(api). Ligamen calls the first when the plugin is enabled and the second when it is turned off. The api object gives a plugin these abilities:

Everything a plugin registers should be removed in unregister.

The Ghosting plugin#

The repository contains one reference plugin, Ghosting, in docs/examples/plugins/ghosting. It is an onion skin: it draws silhouettes of nearby frames or key frames over the viewport, with Silhouette and Xray outlines and motion vectors, and has a panel for its settings. Its register function adds one render hook and one panel, and its unregister removes both. It reads the playhead through api.playback_state and samples the pose at other times. Copy the folder into your plugins folder to try it, and use it as a template for your own plugin.

Plugins outside the release#

Some larger features are developed as separate plugins and are not part of Ligamen Studio 1.0.0, for example motion capture and depth 2.5D. They are installed the same way as any other plugin, and this manual does not describe them.