diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-02-10 14:17:59 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-02-10 14:17:59 +0400 |
commit | ac9ec06ec121589fedbfeaa10137140b45bfd668 (patch) | |
tree | ab08f9528136f0b8813593b78621f869d98d655e /doc/python_api/examples/bpy.types.UIList.py | |
parent | 3c064f4553e4be988fe4fcec450b59b935fa3c80 (diff) | |
parent | 63af7068ad17f30a526ccb81fbe74253b064bc89 (diff) |
Merged changes in the trunk up to revision 54421.
Conflicts resolved:
release/datafiles/startup.blend
release/scripts/startup/bl_ui/properties_render.py
source/blender/SConscript
source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'doc/python_api/examples/bpy.types.UIList.py')
-rw-r--r-- | doc/python_api/examples/bpy.types.UIList.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/python_api/examples/bpy.types.UIList.py b/doc/python_api/examples/bpy.types.UIList.py index a37bbff726a..0f4ae0703cc 100644 --- a/doc/python_api/examples/bpy.types.UIList.py +++ b/doc/python_api/examples/bpy.types.UIList.py @@ -31,7 +31,8 @@ class MATERIAL_UL_matslots_example(bpy.types.UIList): # You should always start your row layout by a label (icon + text), this will also make the row easily # selectable in the list! # We use icon_value of label, as our given icon is an integer value, not an enum ID. - layout.label(ma.name if ma else "", icon_value=icon) + # Note "data" names should never be translated! + layout.label(text=ma.name if ma else "", translate=False, icon_value=icon) # And now we can add other UI stuff... # Here, we add nodes info if this material uses (old!) shading nodes. if ma and not context.scene.render.use_shading_nodes: @@ -39,15 +40,15 @@ class MATERIAL_UL_matslots_example(bpy.types.UIList): if manode: # The static method UILayout.icon returns the integer value of the icon ID "computed" for the given # RNA object. - layout.label("Node %s" % manode.name, icon_value=layout.icon(manode)) + layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode)) elif ma.use_nodes: - layout.label("Node <none>") + layout.label(text="Node <none>", translate=False) else: - layout.label("") + layout.label(text="") # 'GRID' layout type should be as compact as possible (typically a single icon!). elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) # And now we can use this list everywhere in Blender. Here is a small example panel. |