From 3222c9ce99661f40f86fda8c2d369b1add72d8d6 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 25 Jan 2022 13:40:40 +1100 Subject: [PATCH] Fix #1998. Fix bug where colours don't show if styling is applied to the mapped item instead of the actual representation item. --- src/blenderbim/blenderbim/bim/import_ifc.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/import_ifc.py b/src/blenderbim/blenderbim/bim/import_ifc.py index e7527ce30c..da786c33a2 100644 --- a/src/blenderbim/blenderbim/bim/import_ifc.py +++ b/src/blenderbim/blenderbim/bim/import_ifc.py @@ -109,7 +109,7 @@ class MaterialCreator: def parse_representation(self, representation): has_parsed = False - representation_items = self.resolve_mapped_representation_items(representation) + representation_items = self.resolve_all_representation_items(representation) for item in representation_items: if self.parse_representation_item(item): has_parsed = True @@ -143,13 +143,12 @@ class MaterialCreator: ] self.mesh.polygons.foreach_set("material_index", material_index) - def resolve_mapped_representation_items(self, representation): + def resolve_all_representation_items(self, representation): items = [] for item in representation.Items: if item.is_a("IfcMappedItem"): items.extend(item.MappingSource.MappedRepresentation.Items) - else: - items.append(item) + items.append(item) return items