Introduction

File architecture

The file architecture is as follows:
  • An icons folder
    Here you can put custom icons (PNGs, 16x16px and 32x32px)
  • A menus folder
    Contains all the menus
  • An operators folder
    Contains all the operators
  • A panels folder
    Contains all UI classes with which the user interacts
  • A properties folder
    Contains all the properties definitions
Most of these folders contain one folder per module (the folder is then named with the module's name).
Moreover, you may find these folders in all parent folders:
  • utils: contains utility functions used in all modules.

  • shared: contains code used in all modules.

Auto-loader

This addon is loaded using an 'autoloader' helper. This is one is mostly inspired from the 'autoloader' used in animation nodes.
Consequently, every folder in the source directory must contain an __init__.py file.
For each class, you need to define two attributes:
  • The register_cls attribute (bool), indicates if this class has to be registered.

  • The is_custom_base_cls attribute (bool), indicates if this class is a custom base class of other classes.

Coding style

We try to follow as close as possible the coding style proposed by the Blender development team.
Python code should adhere to PEP 8 (with some exceptions, see the link above).