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:
authorAaron Carlisle <Blendify>2020-03-05 03:40:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-05 03:45:22 +0300
commitae223ff52bed52811873c110ecf1045d2da35b9b (patch)
tree3e485e2b47dce27af9328d270d39580cf4f78a3d /release/scripts/modules/addon_utils.py
parent3da2dc82132f82356ffdfaf3e4c9bf3e643e8aaf (diff)
Addons: deprecate 'wiki_url'
When running with debug enabled ('-d' argument), warnings are printed for add-ons which are not yet updated. Reminder to name things based on what they do, not the technologies they use :)
Diffstat (limited to 'release/scripts/modules/addon_utils.py')
-rw-r--r--release/scripts/modules/addon_utils.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index b58c683dc24..43d62913ff7 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -505,7 +505,7 @@ def module_bl_info(mod, info_basis=None):
"blender": (),
"location": "",
"description": "",
- "wiki_url": "",
+ "doc_url": "",
"support": 'COMMUNITY',
"category": "",
"warning": "",
@@ -527,5 +527,21 @@ def module_bl_info(mod, info_basis=None):
if not addon_info["name"]:
addon_info["name"] = mod.__name__
+ # Replace 'wiki_url' with 'doc_url'.
+ doc_url = addon_info.pop("wiki_url", None)
+ if doc_url is not None:
+ # Unlikely, but possible that both are set.
+ if not addon_info["doc_url"]:
+ addon_info["doc_url"] = doc_url
+ if _bpy.app.debug:
+ print(
+ "Warning: add-on \"{addon_name}\": 'wiki_url' in 'bl_info' "
+ "is deprecated please use 'doc_url' instead!\n"
+ " {addon_path}".format(
+ addon_name=addon_info['name'],
+ addon_path=getattr(mod, "__file__", None),
+ )
+ )
+
addon_info["_init"] = None
return addon_info