Created
February 4, 2018 19:43
-
-
Save p2or/3ba036943e374e3ea75fc5abd2d79139 to your computer and use it in GitHub Desktop.
Open UserPrefs and expand #Blender #BSE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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