2.5 Addons:

Request from mindrones :)
* Next to the Wiki URL, it's now possible to have a link to the tracker, for bug reports.

"bl_addon_info" dictionary: 
* Renamed 'url' to 'wiki_url'
* Added 'tracker_url'
This commit is contained in:
Thomas Dinges 2010-05-30 20:48:09 +00:00
parent b8f3a1f4fe
commit 03220bfe71

@ -1191,7 +1191,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
# If there are Infos or UI is expanded # If there are Infos or UI is expanded
if info["expanded"]: if info["expanded"]:
row.operator("wm.addon_expand", icon="TRIA_DOWN").module = module_name row.operator("wm.addon_expand", icon="TRIA_DOWN").module = module_name
elif info["author"] or info["version"] or info["url"] or info["location"]: elif info["author"] or info["version"] or info["wiki_url"] or info["location"]:
row.operator("wm.addon_expand", icon="TRIA_RIGHT").module = module_name row.operator("wm.addon_expand", icon="TRIA_RIGHT").module = module_name
else: else:
# Else, block UI # Else, block UI
@ -1220,12 +1220,19 @@ class USERPREF_PT_addons(bpy.types.Panel):
split = column.row().split(percentage=0.15) split = column.row().split(percentage=0.15)
split.label(text='Description:') split.label(text='Description:')
split.label(text=info["description"]) split.label(text=info["description"])
if info["url"]: if info["wiki_url"] or info["tracker_url"]:
split = column.row().split(percentage=0.15) split = column.row().split(percentage=0.15)
split.label(text="Internet:") split.label(text="Internet:")
split.operator("wm.addon_links", text="Link to the Wiki").link = info["url"] if info["wiki_url"]:
split.separator() split.operator("wm.addon_links", text="Link to the Wiki").link = info["wiki_url"]
split.separator() if info["tracker_url"]:
split.operator("wm.addon_links", text="Report a Bug").link = info["tracker_url"]
if info["wiki_url"] and info["tracker_url"]:
split.separator()
else:
split.separator()
split.separator()
# Append missing scripts # Append missing scripts
# First collect scripts that are used but have no script file. # First collect scripts that are used but have no script file.
@ -1249,7 +1256,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
from bpy.props import * from bpy.props import *
def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "description": "", "url": "", "category": "", "expanded": False}): def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "description": "", "wiki_url": "", "tracker_url": "", "category": "", "expanded": False}):
addon_info = getattr(mod, "bl_addon_info", {}) addon_info = getattr(mod, "bl_addon_info", {})
# avoid re-initializing # avoid re-initializing