mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
addon_utils: add disable_all function
This commit is contained in:
parent
a96110e710
commit
9af6f40e4d
1 changed files with 8 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ __all__ = (
|
|||
"check",
|
||||
"enable",
|
||||
"disable",
|
||||
"disable_all",
|
||||
"reset_all",
|
||||
"module_bl_info",
|
||||
)
|
||||
|
|
@ -444,6 +445,13 @@ def reset_all(*, reload_scripts=False):
|
|||
disable(mod_name)
|
||||
|
||||
|
||||
def disable_all():
|
||||
import sys
|
||||
for mod_name, mod in sys.modules.items():
|
||||
if getattr(mod, "__addon_enabled__", False):
|
||||
disable(mod_name)
|
||||
|
||||
|
||||
def module_bl_info(mod, info_basis=None):
|
||||
if info_basis is None:
|
||||
info_basis = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue