Fix uilists showing data names translated (reported on bf-translations ML by Satoshi...
[blender.git] / release / scripts / startup / bl_ui / properties_mask_common.py
index ea04b79357ee84777f28864bf91b031db25fc669..4ceaffbaf8dc111cdc54737e8ca0e56f6f76ebf2 100644 (file)
@@ -26,13 +26,13 @@ from bpy.types import Menu, UIList
 
 
 class MASK_UL_layers(UIList):
-    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
-        if not isinstance(item, bpy.types.MaskLayer):
-            return
+    def draw_item(self, context, layout, data, item, icon,
+                  active_data, active_propname, index):
+        # assert(isinstance(item, bpy.types.MaskLayer)
         mask = item
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
             split = layout.split()
-            split.label(mask.name, icon_value=icon)
+            split.label(text=mask.name, translate=False, icon_value=icon)
             row = split.row(align=True)
             row.prop(mask, "alpha", text="", emboss=False)
             row.prop(mask, "hide", text="", emboss=False)
@@ -40,7 +40,7 @@ class MASK_UL_layers(UIList):
             row.prop(mask, "hide_render", text="", emboss=False)
         elif self.layout_type in {'GRID'}:
             layout.alignment = 'CENTER'
-            layout.label("", icon_value=icon)
+            layout.label(text="", icon_value=icon)
 
 
 class MASK_PT_mask:
@@ -87,7 +87,8 @@ class MASK_PT_layers:
         rows = 5 if active_layer else 2
 
         row = layout.row()
-        row.template_list("MASK_UL_layers", "", mask, "layers", mask, "active_layer_index", rows=rows)
+        row.template_list("MASK_UL_layers", "", mask, "layers",
+                          mask, "active_layer_index", rows=rows)
 
         sub = row.column(align=True)