Packaging and installing add-ons
We learned how to install single .py
add-ons in the Installing our add-ons section of Chapter 3. To distribute an add-on that consists of more files, we must create a .zip
archive of it. Most of you will be familiar with how a .zip
file is a compressed archive that can contain more files or folders.
Blender can install folders from a standard .zip
archive, but there are two requirements:
- The
.zip
file must contain the add-on as a first-level folder - The name of the first-level folder must not contain any dot (
.
) as it won’t work with Python’s import system
There are third-party tools, such as 7-Zip, that provide a wide array of options, but it is possible to create .zip
files using the file utilities of your operating system. In this section, we will learn how to compress an add-on folder on Windows OSX, and Ubuntu systems.
Cleaning up bytecode
If the structured_addon.zip\structured_addon
folder contains a subfolder...