[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4303] trunk/py/scripts/addons/ io_scene_ms3d: mod: respecting layout_type {'DEFAULT', 'COMPACT', 'GRID', } in UIList class
Alexander Nussbaumer
alpha-beta-release at gmx.net
Mon Feb 18 21:47:18 CET 2013
Revision: 4303
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4303
Author: beta-tester
Date: 2013-02-18 20:47:17 +0000 (Mon, 18 Feb 2013)
Log Message:
-----------
mod: respecting layout_type {'DEFAULT', 'COMPACT', 'GRID', } in UIList class
shown in:
http://www.blender.org/documentation/blender_python_api_2_65_10/bpy.types.UIList.html
Modified Paths:
--------------
trunk/py/scripts/addons/io_scene_ms3d/__init__.py
trunk/py/scripts/addons/io_scene_ms3d/ms3d_ui.py
Modified: trunk/py/scripts/addons/io_scene_ms3d/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_scene_ms3d/__init__.py 2013-02-18 18:42:40 UTC (rev 4302)
+++ trunk/py/scripts/addons/io_scene_ms3d/__init__.py 2013-02-18 20:47:17 UTC (rev 4303)
@@ -23,8 +23,8 @@
'description': "Import / Export MilkShape3D MS3D files"\
" (conform with MilkShape3D v1.8.4)",
'author': "Alexander Nussbaumer",
- 'version': (0, 95, 3),
- 'blender': (2, 65, 3),
+ 'version': (0, 96, 0),
+ 'blender': (2, 66, 0),
'location': "File > Import & File > Export",
'warning': "",
'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
Modified: trunk/py/scripts/addons/io_scene_ms3d/ms3d_ui.py
===================================================================
--- trunk/py/scripts/addons/io_scene_ms3d/ms3d_ui.py 2013-02-18 18:42:40 UTC (rev 4302)
+++ trunk/py/scripts/addons/io_scene_ms3d/ms3d_ui.py 2013-02-18 20:47:17 UTC (rev 4303)
@@ -1246,12 +1246,15 @@
###############################################################################
-# http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53355
+# http://www.blender.org/documentation/blender_python_api_2_65_10/bpy.types.UIList.html
class Ms3dGroupUILise(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
- layout.label(item.name, icon_value=icon)
+ if self.layout_type in {'DEFAULT', 'COMPACT', }:
+ layout.label(text=item.name, icon_value=icon)
+ elif self.layout_type in {'GRID', }:
+ layout.alignment = 'CENTER'
+ layout.label(text="", icon_value=icon)
-
###############################################################################
class Ms3dMeshPanel(Panel):
bl_label = ms3d_str['LABEL_PANEL_MODEL']
@@ -1409,7 +1412,6 @@
row = layout.row()
- # http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53355
row.template_list(
listtype_name='Ms3dGroupUILise',
dataptr=custom_data,
More information about the Bf-extensions-cvs
mailing list