[Bf-blender-cvs] [cafe5cd9b03] master: Cleanup: explain why checking the enabled state twice is needed
Campbell Barton
noreply at git.blender.org
Mon Aug 17 04:53:20 CEST 2020
Commit: cafe5cd9b036b41dfe21fddc5ebc5bf7948c98aa
Author: Campbell Barton
Date: Mon Aug 17 12:33:07 2020 +1000
Branches: master
https://developer.blender.org/rBcafe5cd9b036b41dfe21fddc5ebc5bf7948c98aa
Cleanup: explain why checking the enabled state twice is needed
Address concern raised with the commit that added this extra check.
===================================================================
M release/scripts/modules/addon_utils.py
===================================================================
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index af6d4b1cd29..6fd091cefc2 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -492,6 +492,8 @@ def disable_all():
item for item in sys.modules.items()
if getattr(item[1], "__addon_enabled__", False)
]
+ # Check the enabled state again since it's possible the disable call
+ # of one add-on disables others.
for mod_name, mod in addon_modules:
if getattr(mod, "__addon_enabled__", False):
disable(mod_name)
More information about the Bf-blender-cvs
mailing list