Combined Add-on Extensions

Hello,
I’m trying to understand the documentation on the new Extensions system.

Bundle other add-ons together.

This is recommended if an add-on depends on another add-on.

Make sure that both the individual and the combined add-on check for already registered types (Operators, Panels, …). This avoids duplication of operators and panels on the interface if the add-ons are installed as a bundle and individually.

Could someone please clarify how a bundled extension might look, file structure-wise? How would we identify each individual add-on within a combined add-on bundle and how are they registered?

scripts/
└── addons/
    └── my_multi_addon/
        ├── __init__.py
        ├── AUTHORS
        ├── blender_manifest.toml
        ├── addon_one/
        │   ├── __init__.py
        │   ├── operators.py
        │   ├── panels.py
        │   └── utils.py
        ├── addon_two/
        │   ├── __init__.py
        │   ├── operators.py
        │   ├── panels.py
        │   └── utils.py
        ├── dependencies/
        │   └── my_dependency-1.0.0-py3-none-any.whl

Thank you.

As I was told you need to include each add-on in separate file, you shouldn’t have my_multi_addon folder. That nesting is unnecessary. Install operator just unzips folders in correct directory, if you have multiple add-on folders there it will just drop them.

Thank you for the reply. So if I .zip a bundle of add-ons, ‘Install from Disk’ will register all of them together? Would they have one blender_manifest.toml or would each add-on have its own blender_manifest.toml?

Each of them will have theres. I think you’re overthinking this. Basically you go to where your add-on folders are, select bunch of them and zip together. IDEALLY this should work and whenever someone installs they’ll get add-ons you selected unzipped in their directory

I don’t think it’s as simple as this. From my tests, the zip file needs a blender_manifest.toml or else we get Missing manifest from: /Users/username/Desktop/Test_Bundle.zip

The documentation mentions a “combined add-on.” I am seeking the correct way to set this up.

So, if someone creates an extension that offers a feature tweak to Rigify, then their extension archive should also include a copy of the Rigify extension?

If I have a newer version of rigify already installed than they included, what happens when I install this other extension?

2 Likes

What you have sounds about right.

The other recommendations I have is to:

  • Leave wheels in a wheels folder (optional).
  • Make sure the add-ons are not registered before you registed them, to avoid duplicated classes.

The latter is important if your add-on may have been installed indepently. The same applies to the independent add-ons as well (since you have no control over the order of their registration).

Rigify is a different case since it relies on being on the global namespace. It is more an eco-system for add-ons than an add-on itself. The correct approach for these case is to have a wheel exposing its API ot the global namespace. You can read more details about this here. The same approach will have to be done by BlenderBIM by the way.

Thank you for the reply. Could your team please provide an example of a combined add-on?

As mentioned before, from my tests, the zip file needs a blender_manifest.toml or else we get a Missing manifest error.

The documentation mentions a “combined add-on.” How do we set up its manifest so that all of the add-ons get registered (while checking for duplicated before registering)?

Thank you!