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:
1 |
bpy.ops.wm.addon_disable(module = 'add-on name') |
To uninstall the add-on:
1 |
bpy.ops.wm.addon_remove(module = 'add-on name') |
To install the add-on:
If the “overwrite” parameter is True, the add-on will be reinstalled, even if it has not been previously removed.
1 |
bpy.ops.wm.addon_install(filepath = 'path to the add-on destributive file', overwrite = True) |
To activate the add-on:
1 |
bpy.ops.wm.addon_enable(module = 'add-on name') |