Skip to content

Instantly share code, notes, and snippets.

@don1138
Created January 22, 2023 05:57
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/e982ad5ce0f177f5d34ed0f13adb97d8 to your computer and use it in GitHub Desktop.
Save don1138/e982ad5ce0f177f5d34ed0f13adb97d8 to your computer and use it in GitHub Desktop.
Blender - Print all enabled add-ons
#PRINT LIST OF NAMES
#import bpy
#for addon in bpy.context.preferences.addons:
# print(addon.module)
#PRINT LIST OF NAMES AS ARRAY
#print(bpy.context.preferences.addons.keys())
#PRINT LIST FROM BL_INFO
import bpy
import sys
import re
context = bpy.context
for mod_name in context.preferences.addons.keys():
mod = sys.modules[mod_name]
name = mod.bl_info.get('name')
cat = mod.bl_info.get('category')
vers = mod.bl_info.get('version')
print(f"{cat} > {name}\n{mod}")
# Parse 'mod' to get key names
# qlist = re.findall("\'(.*?)\'",str(mod))
# qval = qlist[0]
# print(f"'{qval}',")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment