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:
authorLuca Bonavita <mindrones@gmail.com>2010-06-17 06:38:49 +0400
committerLuca Bonavita <mindrones@gmail.com>2010-06-17 06:38:49 +0400
commit22bca493b23904c4dee7130f5737005f8558a26d (patch)
treee5c9946e6c3acaa197a32804049c2ba71d4a5b13
parent08a94f9bbdf74a2d87da5908d919d018445ca222 (diff)
== addons ==
- release/scripts/ui/space_userpref.py added the change to add a 'warning' field to bl_addon_info warning icons are used to show 'broken' scripts or warnings asked permission to campbell and matt in blendercoders to apply this - source/blender/python/doc/sphinx_doc_gen.py: small fix in the url
-rw-r--r--release/scripts/ui/space_userpref.py29
-rw-r--r--source/blender/python/doc/sphinx_doc_gen.py2
2 files changed, 21 insertions, 10 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index 066c0f2f60a..e3287b0a946 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -1200,10 +1200,25 @@ class USERPREF_PT_addons(bpy.types.Panel):
arrow.operator("wm.addon_expand", icon="TRIA_RIGHT").module = module_name
row.label(text=info["name"])
- row.operator("wm.addon_disable" if is_enabled else "wm.addon_enable").module = module_name
+
+ if is_enabled: operator = "wm.addon_disable"
+ else: operator = "wm.addon_enable"
+
+ if info["warning"]: button_icon='ERROR'
+ else: button_icon='BLENDER'
+
+ row.operator(operator, icon=button_icon).module = module_name
# Expanded UI (only if additional infos are available)
if info["expanded"]:
+ if info["description"]:
+ split = column.row().split(percentage=0.15)
+ split.label(text='Description:')
+ split.label(text=info["description"])
+ if info["location"]:
+ split = column.row().split(percentage=0.15)
+ split.label(text='Location:')
+ split.label(text=info["location"])
if info["author"]:
split = column.row().split(percentage=0.15)
split.label(text='Author:')
@@ -1212,14 +1227,10 @@ class USERPREF_PT_addons(bpy.types.Panel):
split = column.row().split(percentage=0.15)
split.label(text='Version:')
split.label(text=info["version"])
- if info["location"]:
- split = column.row().split(percentage=0.15)
- split.label(text='Location:')
- split.label(text=info["location"])
- if info["description"]:
+ if info["warning"]:
split = column.row().split(percentage=0.15)
- split.label(text='Description:')
- split.label(text=info["description"])
+ split.label(text="Warning:")
+ split.label(text=' ' + info["warning"], icon = 'ERROR')
if info["wiki_url"] or info["tracker_url"]:
split = column.row().split(percentage=0.15)
split.label(text="Internet:")
@@ -1256,7 +1267,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
from bpy.props import *
-def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "description": "", "wiki_url": "", "tracker_url": "", "category": "", "expanded": False}):
+def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "description": "", "wiki_url": "", "tracker_url": "", "category": "", "warning": "", "expanded": False}):
addon_info = getattr(mod, "bl_addon_info", {})
# avoid re-initializing
diff --git a/source/blender/python/doc/sphinx_doc_gen.py b/source/blender/python/doc/sphinx_doc_gen.py
index 3b0b9f60795..6363e14d85c 100644
--- a/source/blender/python/doc/sphinx_doc_gen.py
+++ b/source/blender/python/doc/sphinx_doc_gen.py
@@ -57,7 +57,7 @@ _BPY_FULL_REBUILD = False
def undocumented_message(module_name, type_name, identifier):
message = "Undocumented (`contribute " \
"<http://wiki.blender.org/index.php/Dev:2.5/Py/API/Documentation/Contribute" \
- "&action=edit&section=new&preload=Dev:2.5/Py/API/Documentation/Contribute/Howto-message" \
+ "?action=edit&section=new&preload=Dev:2.5/Py/API/Documentation/Contribute/Howto-message" \
"&preloadtitle=%s.%s.%s>`_)\n\n" % (module_name, type_name, identifier)
return message