Packaging plugins


Plugin package contents

Packages are a single file, internally a zip archive, containing a pluginInfo.json file with metadata about the plugin, 

the plugin code, and any other files or resources needed by the plugin to work.


PluginInfo.json entries:

EntryDescriptionDefault ValueNotes
metadata_format_versionThe format of the metadata file.1

Required.

Currently must be set to 1.
nameThe plugin name.

Required.

Must match the name of the Python module containing the plugin code

versionThe plugin version.
Optional.
authorThe plugin author.
Optional.
emailThe plugin author email.
Optional.
min_designer_versionMinimum version of Substance Designer required by the plugin to work.2019.2Optional.
platformPlatform the plugin runs on.any

Optional.

For plugins containing compiled code, this entry can be used to disable the plugin in non-supported platforms.

Possible values: win, linux, osx, any.


Creating a new plugin package project

We provide a Cookiecutter template project to simplify the creation of plugin package projects.

You can use it directly or modify it for you own needs.

The template can be found in Substance Designer's directory,  plugins/tools/pkgplugintemplate


Install Python if it is not already installed in your system.

Cookiecutter is compatible with both Python 2 and Python 3.


Install Cookiecutter if you don't have it already.

Usually this can be done by using pip:

pip install cookiecutter

For alternative ways to install Cookiecutter or for more information about Cookiecutter

you can check the documentation at https://cookiecutter.readthedocs.io/en/latest/installation.html


Create a new Substance Designer plugin package project:
In a terminal window run:

cookiecutter path/to/pkgplugintemplate -o path/to/new/project

And fill the information required. The new project will be created in the specified directory.


Package your plugin once development is complete.
In a terminal window run:

python makepackage.py

The plugin package will be generated in the build directory.