diff --git a/src/ifcblenderexport/blenderbim/bim/export_ifc.py b/src/ifcblenderexport/blenderbim/bim/export_ifc.py index 38c60044cf..d5d2b2842c 100644 --- a/src/ifcblenderexport/blenderbim/bim/export_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/export_ifc.py @@ -1852,6 +1852,8 @@ class IfcExporter(): for mapped_item in representation.Items: items = mapped_item[0].MappedRepresentation.Items for i, item in enumerate(items): + if i >= len(product['raw'].material_slots): + i = 0 material_slots[product['raw'].material_slots[i].name] = item for styled_item_name, representation_item in material_slots.items(): if styled_item_name == styled_item['attributes']['Name']: