I have a UI List with custom item properties. For the items, I have a class with an enum property with three options.
class MYLIST_props(PropertyGroup):
myEnum: bpy.props.EnumProperty(name="", items=[('A', "Apple", ""), ('B', "Banana", ""), ('C', "Cherry", "")])
The way I currently display the items in the list:
class MYLIST_UL_UIList(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
scene = context.scene
split = layout.split(factor=0.33)
split.label(text=str(item.myEnum))
split.prop(item, "myEnum")
How could I change the "split.label(text=str(item.myEnum))" to display the name instead of the identifier? So I would get values like Apple, Banana, Cherry, and not A, B, or C?