Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-03 08:58:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-03 08:59:08 +0300
commit1ff5cc8c1ac7e4262b131a63c7e0fbb7d4fa8a8d (patch)
treebd81542451a493be89b8c1db8a1d96ba37f63d04 /release/scripts/modules/addon_utils.py
parent7a0750016e7b7f831dd9cbcd14ee12979159ce78 (diff)
addons: disable addons with versions below 2.8
Diffstat (limited to 'release/scripts/modules/addon_utils.py')
-rw-r--r--release/scripts/modules/addon_utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index 1b6dae68684..c96acb002af 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -351,6 +351,16 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
_addon_remove(module_name)
return None
+ # 1.1) fail when add-on is too old
+ # This is a temporary 2.8x migration check, so we can manage addons that are supported.
+ try:
+ print(mod.bl_info.get("blender", (0, 0, 0)))
+ if mod.bl_info.get("blender", (0, 0, 0)) < (2, 80, 0):
+ raise Exception(f"Add-on '{module_name:s}' has not been upgraded to 2.8, ignoring")
+ except Exception as ex:
+ handle_error(ex)
+ return None
+
# 2) try register collected modules
# removed, addons need to handle own registration now.