diff --git a/io_scene_psk_psa/psk/export/ui.py b/io_scene_psk_psa/psk/export/ui.py index f12d2a5..f768b30 100644 --- a/io_scene_psk_psa/psk/export/ui.py +++ b/io_scene_psk_psa/psk/export/ui.py @@ -21,8 +21,23 @@ class PSK_UL_material_names(UIList): row = layout.row() item = typing_cast(PSK_PG_material_name_list_item, item) material = bpy.data.materials.get(item.material_name, None) - icon_value = layout.icon(material) if material else 0 - row.prop(item, 'material_name', text='', emboss=False, icon_value=icon_value, icon='BLANK1' if icon_value == 0 else 'NONE') + + # If the material is not found by name and the name is not 'None', show a not found icon + if item.material_name == 'None': + icon = 'NODE_MATERIAL' + else: + icon = 'NOT_FOUND' if material is None else 'NONE' + + row.prop(item, 'material_name', text='', emboss=False, + icon_value=layout.icon(material) if material else 0, + icon=icon) + + # Add right-aligned "Not Found" label if material is not found + if item.material_name != 'None' and material is None: + label_row = row.row() + label_row.alignment = 'RIGHT' + label_row.enabled = False + label_row.label(text='Not Found') _classes = (