Add-ons

The Daz Importer has a mechanism that lets users add functionality, i.e. an add-on system. Blender of course already has an add-on system, and you could write Blender add-ons that invoke the import-daz module, but that approach has some drawbacks. In particular, such "horizontal" calling will break if the name of the import-daz module is changed, e.g. to diffeomorphic-import-daz-bb15d1ca5708. A cleaner solution would be that add-ons for the Daz importer could be handled by the importer itself.

A Daz importer add-on is a python file that you put in the addons directory (under the import-daz directory, which itself is located under Blender's addon directory). It must contain the same information as a Blender add-on: a bl_info dict, and a register and an unregister function. Packages are supported; in that case the file __init__.py, must contain the bl_info dict and the register and unregister functions.

The file __init__.py in the addons folder should not be touched. It is an empty file which is necessary to make the addons directory into a Python package.

Information about the add-ons is found in the new Add-Ons menu. When no add-ons are loaded, it only contains the buttons Refresh and Save Settings.
When we press Refresh a list of add-ons appear below the buttons. All add-ons are loaded into memory, but they are not yet registered.
The interface is very similar to Blender's native add-on interface, cf https://docs.blender.org/manual/en/latest/preferences/addons.html. Each add-on has an arrow button, an enable checkbox, and the name of the add-on. The arrow button displays more information about the add-on, which is extracted from the bl_info dict.

When the checkbox is enabled, the add-on's register function is executed.
The Save Settings button saves a list of enabled add-ons. The next time Blender is started (or when the F8 key is pressed), these add-ons are loaded and enabled.