Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander N <alpha-beta-release@gmx.net>2013-02-19 00:47:17 +0400
committerAlexander N <alpha-beta-release@gmx.net>2013-02-19 00:47:17 +0400
commit8a4774041ca5a04e3bc14a18346689337f5c627a (patch)
tree64face9392464191dcbce28989402064f5678adf
parente8f5f3366cfbb443d8f556f9697f6dfd990b1e43 (diff)
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
-rw-r--r--io_scene_ms3d/__init__.py4
-rw-r--r--io_scene_ms3d/ms3d_ui.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/io_scene_ms3d/__init__.py b/io_scene_ms3d/__init__.py
index cafc3a7d..73534177 100644
--- a/io_scene_ms3d/__init__.py
+++ b/io_scene_ms3d/__init__.py
@@ -23,8 +23,8 @@ bl_info = {
'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/"\
diff --git a/io_scene_ms3d/ms3d_ui.py b/io_scene_ms3d/ms3d_ui.py
index ee4b6b5c..46d8a500 100644
--- a/io_scene_ms3d/ms3d_ui.py
+++ b/io_scene_ms3d/ms3d_ui.py
@@ -1246,11 +1246,14 @@ class Ms3dMaterialProperties(PropertyGroup):
###############################################################################
-# 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):
@@ -1409,7 +1412,6 @@ class Ms3dGroupPanel(Panel):
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,