diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/addon_utils.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py index 588c10eea54..695bb8cb6b6 100644 --- a/release/scripts/modules/addon_utils.py +++ b/release/scripts/modules/addon_utils.py @@ -212,10 +212,13 @@ def check(module_name): loaded_state = False + if mod and getattr(mod, "__addon_persistent__", False): + loaded_default = True + return loaded_default, loaded_state -def enable(module_name, default_set=True): +def enable(module_name, default_set=True, persistent=False): """ Enables an addon by name. @@ -283,6 +286,7 @@ def enable(module_name, default_set=True): ext.module = module_name mod.__addon_enabled__ = True + mod.__addon_persistent__ = persistent if _bpy.app.debug_python: print("\taddon_utils.enable", mod.__name__) @@ -305,6 +309,7 @@ def disable(module_name, default_set=True): # the addon in the user prefs. if mod: mod.__addon_enabled__ = False + mod.__addon_persistent = False try: mod.unregister() |