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-11-08 02:10:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-08 02:10:08 +0300
commita421cfa8d31d85c9e855788c25de4f37ef10ab34 (patch)
tree7739316f02d9b287b4f525651834eff4583b09b9 /release
parentbcf1997ac27d43d48aa60e1e2cd3c9e883cf620c (diff)
UI: hide bundled addons which haven't been updated
All are displayed when '--debug' is set, see: T56351
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 2dac1cb4c78..a7504255dd5 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1291,6 +1291,11 @@ class USERPREF_PT_addons(Panel):
if p
)
+ # Development option for 2.8x, don't show users bundled addons
+ # unless they have been updated for 2.8x.
+ # Developers can turn them on with '--debug'
+ show_official_27x_addons = bpy.app.debug
+
# collect the categories that can be filtered on
addons = [
(mod, addon_utils.module_bl_info(mod))
@@ -1360,6 +1365,15 @@ class USERPREF_PT_addons(Panel):
else:
continue
+ # Skip 2.7x add-ons included with Blender, unless in debug mode.
+ is_addon_27x = info.get("blender", (0,)) < (2, 80)
+ if (
+ is_addon_27x and
+ (not show_official_27x_addons) and
+ (not mod.__file__.startswith(addon_user_dirs))
+ ):
+ continue
+
# Addon UI Code
col_box = col.column()
box = col_box.box()
@@ -1384,7 +1398,7 @@ class USERPREF_PT_addons(Panel):
# WARNING: 2.8x exception, may be removed
# use disabled state for old add-ons, chances are they are broken.
- if info.get("blender", (0,)) < (2, 80):
+ if is_addon_27x:
sub.label(text="upgrade to 2.8x required")
sub.label(icon='ERROR')
# Remove code above after 2.8x migration is complete.