Skip to content

Instantly share code, notes, and snippets.

@don1138
Created January 22, 2023 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save don1138/c46a554c857cccc46f22e32a1a0fde47 to your computer and use it in GitHub Desktop.
Save don1138/c46a554c857cccc46f22e32a1a0fde47 to your computer and use it in GitHub Desktop.
Blender - Enable/disable all add-ons
import bpy
# GET LIST OF ALL ENABLED ADD-ONS
# print(bpy.context.preferences.addons.keys())
modules = [
'add_mesh_extra_objects',
'amaranth',
'cycles',
'io_curve_svg',
'io_import_images_as_planes',
'io_mesh_ply',
'io_mesh_stl',
'io_mesh_uv_layout',
'io_scene_fbx',
'io_scene_gltf2',
'io_scene_obj',
'io_vector',
'mesh_f2',
'mesh_tiny_cad',
'mesh_tools',
'node_wrangler',
]
message = ""
for m in modules:
try:
bpy.ops.preferences.addon_enable(module=m)
# bpy.ops.preferences.addon_disable(module=m)
except:
message = message + m + ", "
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment