From bdaf8cd0f39b1588d83d42b296c869d2c9f22d06 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 3 Dec 2020 21:44:20 +1100 Subject: [PATCH] Fix import bug where duplicate material names with accents cause import to fail --- src/ifcblenderexport/blenderbim/bim/import_ifc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcblenderexport/blenderbim/bim/import_ifc.py b/src/ifcblenderexport/blenderbim/bim/import_ifc.py index 7812e25596..510b3c4933 100644 --- a/src/ifcblenderexport/blenderbim/bim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/import_ifc.py @@ -122,7 +122,7 @@ class MaterialCreator: # material name is duplicated, and so a '.001' is added. # The maximum characters for the material name is 59 in this # scenario. - material = material[0:59] + material = bytes(material, "utf-8")[0:59].decode("utf-8") slot_index = [self.canonicalise_material_name(s.name) for s in obj.material_slots].index(material) material_to_slot[i] = slot_index