[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29505] trunk/blender: == addons ==
Luca Bonavita
mindrones at gmail.com
Thu Jun 17 04:38:52 CEST 2010
Revision: 29505
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29505
Author: mindrones
Date: 2010-06-17 04:38:49 +0200 (Thu, 17 Jun 2010)
Log Message:
-----------
== 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
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_userpref.py
trunk/blender/source/blender/python/doc/sphinx_doc_gen.py
Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py 2010-06-17 02:15:15 UTC (rev 29504)
+++ trunk/blender/release/scripts/ui/space_userpref.py 2010-06-17 02:38:49 UTC (rev 29505)
@@ -1200,10 +1200,25 @@
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 @@
split = column.row().split(percentage=0.15)
split.label(text='Version:')
split.label(text=info["version"])
- if info["location"]:
+ if info["warning"]:
split = column.row().split(percentage=0.15)
- split.label(text='Location:')
- split.label(text=info["location"])
- if info["description"]:
- 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 @@
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
Modified: trunk/blender/source/blender/python/doc/sphinx_doc_gen.py
===================================================================
--- trunk/blender/source/blender/python/doc/sphinx_doc_gen.py 2010-06-17 02:15:15 UTC (rev 29504)
+++ trunk/blender/source/blender/python/doc/sphinx_doc_gen.py 2010-06-17 02:38:49 UTC (rev 29505)
@@ -57,7 +57,7 @@
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§ion=new&preload=Dev:2.5/Py/API/Documentation/Contribute/Howto-message" \
+ "?action=edit§ion=new&preload=Dev:2.5/Py/API/Documentation/Contribute/Howto-message" \
"&preloadtitle=%s.%s.%s>`_)\n\n" % (module_name, type_name, identifier)
return message
More information about the Bf-blender-cvs
mailing list