[Bf-blender-cvs] [6379c7bd474] blender2.8: Addons: silence warnings instead of disabling

Campbell Barton noreply at git.blender.org
Fri Jul 6 11:03:56 CEST 2018


Commit: 6379c7bd4743cead9121493a41fade42ec465a69
Author: Campbell Barton
Date:   Fri Jul 6 10:59:29 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB6379c7bd4743cead9121493a41fade42ec465a69

Addons: silence warnings instead of disabling

===================================================================

M	release/scripts/modules/addon_utils.py
M	source/blender/blenloader/intern/versioning_defaults.c

===================================================================

diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index c96acb002af..90f6dc665de 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -353,6 +353,20 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
 
         # 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.
+
+        # Silent default, we know these need updating.
+        if module_name in {
+			"io_anim_bvh",
+			"io_mesh_ply",
+			"io_mesh_stl",
+			"io_mesh_uv_layout",
+			"io_scene_3ds",
+			"io_scene_fbx",
+			"io_scene_obj",
+			"io_scene_x3d",
+        }:
+            return None
+
         try:
             print(mod.bl_info.get("blender", (0, 0, 0)))
             if mod.bl_info.get("blender", (0, 0, 0)) < (2, 80, 0):
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 0f219526642..d43000e859e 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -44,7 +44,6 @@
 #include "DNA_object_types.h"
 #include "DNA_workspace_types.h"
 
-#include "BKE_addon.h"
 #include "BKE_brush.h"
 #include "BKE_library.h"
 #include "BKE_main.h"
@@ -53,7 +52,6 @@
 
 #include "BLO_readfile.h"
 
-
 /**
  * Override values in in-memory startup.blend, avoids resaving for small changes.
  */
@@ -96,23 +94,6 @@ void BLO_update_defaults_userpref_blend(void)
 	U.flag &= ~USER_SCRIPT_AUTOEXEC_DISABLE;
 #endif
 
-	/* XXX, until these are working w/ 2.8x. */
-	{
-		const char *addon_id_remove[] = {
-			"io_anim_bvh",
-			"io_mesh_ply",
-			"io_mesh_stl",
-			"io_mesh_uv_layout",
-			"io_scene_3ds",
-			"io_scene_fbx",
-			"io_scene_obj",
-			"io_scene_x3d",
-		};
-		for (int i = 0; i < ARRAY_SIZE(addon_id_remove); i++) {
-			BKE_addon_remove_safe(&U.addons, addon_id_remove[i]);
-		}
-	}
-
 	/* Ignore the theme saved in the blend file,
 	 * instead use the theme from 'userdef_default_theme.c' */
 	{



More information about the Bf-blender-cvs mailing list