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:

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.
email
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.

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 the application directory, under plugins/tools/pkgplugintemplate.

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

    Cookiecutter is compatible with both Python 2 and Python 3

  2. Install Cookiecutter if you don't have it already

    Usually this can be done by using pip:

    code language-none
    
    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

  3. Create a new plugin package project

    In a terminal window run:

    code language-none
    
    cookiecutter path/to/pkgplugintemplate -o path/to/new/project
    

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

  4. Package your plugin once development is complete

    In a terminal window run:

    code language-none
    
    python makepackage.py
    
  5. The plugin package will be generated in the build directory

recommendation-more-help
dd48abc6-e399-43d2-9777-578ec70c5a23