Skip to content

Instantly share code, notes, and snippets.

@p2or
Created February 4, 2018 19:43
Show Gist options
  • Save p2or/3ba036943e374e3ea75fc5abd2d79139 to your computer and use it in GitHub Desktop.
Save p2or/3ba036943e374e3ea75fc5abd2d79139 to your computer and use it in GitHub Desktop.
Open UserPrefs and expand #Blender #BSE
import bpy
import addon_utils
# Set Addon Tab
bpy.context.user_preferences.active_section = 'ADDONS'
# Set Filter
bpy.context.window_manager.addon_search = "Addon Name"
# Get a module reference by name
mod = addon_utils.addons_fake_modules.get("filename")
# If found, expand it
if mod is not None: mod.bl_info['show_expanded'] = True
# Call window
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment