Plugins are MiniC scripts that integrate deeply with ArmorPaint at startup, adding new importers, UI panels, and node categories. They live in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/armory3d/armorpaint/llms.txt
Use this file to discover all available pages before exploring further.
plugins/ data folder and are toggled in Preferences → Plugins. When a plugin is enabled, ArmorPaint reads its name from config.plugins, loads the corresponding .c file, and evaluates it through the built-in MiniC interpreter. A plugin can register callbacks for the render loop, the sidebar UI, and its own teardown — allowing it to behave exactly like a built-in feature.
Plugins are executed by the MiniC interpreter — a C-like language subset embedded in ArmorPaint. Not every feature of standard C is available; in particular, the preprocessor, standard library headers, and direct system calls are absent. All APIs you call must be registered builtins exposed through
minic_api.c.Plugin Lifecycle
Plugin discovery
On startup, ArmorPaint reads
config.plugins — a string_array_t listing enabled plugin filenames (e.g. "io_gltf.c"). Each name corresponds to a file under the plugins/ data directory.plugin_start(plugin_name)
plugin_start reads the plugin file with data_get_blob, sets the internal _plugin_name context variable, then calls minic_eval_named to parse and execute the script. The resulting minic_ctx_t * is stored on the plugin_t so all registered callbacks can reference it later.Plugin self-registration
The top-level code of the plugin script calls
plugin_create() to allocate a plugin_t and registers its callbacks with plugin_notify_on_ui, plugin_notify_on_update, and plugin_notify_on_delete.Runtime callbacks
Each frame the Plugins tab iterates over
g_plugins and calls on_ui for every plugin that registered one. The update callback on_update is driven by the engine’s frame loop. Both run inside the plugin’s own minic_ctx_t.Callbacks
| Callback | When it fires |
|---|---|
on_ui | Once per frame while the Plugins tab is open |
on_update | Every engine frame |
on_delete | Once, when the plugin is stopped or disabled |
Core Plugin API Reference
Plugin Registration
Call these at the top level of your plugin script to create a plugin instance and bind callbacks.Custom Texture Importers
Register a handler for a file extension. ArmorPaint will call your function with the file path when a texture of that type is imported, and expect agpu_texture_t * in return.
Custom Mesh Importers
Register a handler for a mesh file extension. The function receives the file path and must return araw_mesh_t * built with plugin_make_raw_mesh.
Mesh Construction
plugin_make_raw_mesh allocates and initialises a raw_mesh_t from packed vertex data arrays. Positions and normals are stored as quantised 16-bit integers; indices are 32-bit unsigned integers. scale_pos is the world-space scale factor that maps the quantised values back to floating-point coordinates.
Node Categories
Plugins can inject new groups into the material or brush node search list. Pass a category name and anany_array_t * containing the node type strings to expose.
Custom Node Handlers
Once a category is registered, map each node type string to the function that generates its shader code:Minimal Plugin Example
Custom Mesh Importer Example
The following plugin registers a.msh importer. When a .msh file is imported, ArmorPaint calls import_msh with the file path; the function reads the buffer, assembles position/normal/index arrays, and returns a raw_mesh_t *.
Installing Plugins
Copy the plugin file
Copy your
.c plugin file into the ArmorPaint plugins/ data folder. On most platforms this is next to the ArmorPaint executable or under the user data directory.Enable the plugin
Either open Preferences → Plugins and tick the plugin’s checkbox, or drag and drop the
.c file into the ArmorPaint window — import_plugin_run will copy it to the plugins/ folder automatically and log a confirmation in the console.Built-in Plugins
ArmorPaint ships with the following plugins compiled in when theWITH_PLUGINS flag is set. They are registered by plugins_init() at startup and serve as reference implementations.
io_gltf
Imports GLB and glTF meshes, including skinned animation frames, via
io_gltf_parse and io_gltf_parse_skinned.io_fbx
Imports FBX meshes and skinned animation frames via
io_fbx_parse and io_fbx_parse_skinned.io_exr
Imports OpenEXR HDR textures via
io_exr_parse.io_psd
Imports Photoshop PSD files with per-layer texture extraction via
io_psd_parse.io_svg
Imports SVG vector graphics as textures via
io_svg_parse.io_tiff
Imports TIFF textures (
.tiff and .tif) via io_tiff_parse.uv_unwrap
Provides automatic UV unwrapping via
proc_uv_unwrap, accessible from the UV tab.