Install Python if it is not already installed in your system
Cookiecutter is compatible with both Python 2 and Python 3
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:
Entry | Description | Default Value | Notes |
---|---|---|---|
metadata_format_version | The format of the metadata file. | 1 | Required. Currently must be set to 1. |
name | The plugin name. | Required. Must match the name of the Python module containing the plugin code | |
version | The plugin version. | Optional. | |
author | The plugin author. | Optional. | |
The plugin author email. | Optional. | ||
min_designer_version | Minimum version of the application required by the plugin to work. | 2019.2 | Optional. |
platform | Platform 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. |
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 the application directory, under 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 plugin package project
In a terminal window run:
cookiecutter path/to/pkgplugintemplate -o path/to/new/project
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