Debugging multifile Blender add-on by quick reinstall

It is convenient to use the following system for debugging developing multi-file Blender add-ons. But it has one drawback: modules imported in file becomes available only after the file running (after the execution of the register() function). This means that any access to the imported modules before they are registered will cause an error. This is not critical in most cases, but it will cause a problem if, for example, in one imported module is used inheritance from the class, described in the other imported module, because the classes descriptions are processed before the add-on registration.

To get more freedom working with imported modules, we can use another way to debug the add-on – do not run the add-on directly from the development directory, but install it in Blender and check its “live” work. However, manual add-on reinstallation requires a set of routine actions, which complicates such sort of debugging. This issue can be solved by reinstalling the add-on in automatic mode.

Continue reading “Debugging multifile Blender add-on by quick reinstall”

How to install and uninstall Blender add-on via python API

Blender add-ons installation and uninstallation can be managed through the python API. Use the following commands in a script:

To deactivate the add-on:

To uninstall the add-on:

Continue reading “How to install and uninstall Blender add-on via python API”

Mesh Custom Properties editing through the Blender API

New mesh Custom Property can be created through the Blender python API by executing the following code:


  • object_name – name of the mesh
  • property_name – new custom property name
  • property_value – value of this new property

After executing this command, the new property will be created and will be available in the Properties window – Object panel – Custom Properties sub-panel.

Like any object custom properties, the created property has a number of parameters that can be accessed by clicking the Edit button. These parameters can also be changed through the API.

Continue reading “Mesh Custom Properties editing through the Blender API”

Working with UV-Maps through the Blender API

Active (selected) UV-Map:

Access to the active UV-Map by its name:

Continue reading “Working with UV-Maps through the Blender API”