From a1e34b0acb2bc3d7daa340be8ef28b25e28a6a51 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 14 Mar 2021 19:33:55 +1100 Subject: [PATCH] Fix bug on Windows where sometimes, the body representation wouldn't be loaded by default. See #1290. --- src/ifcblenderexport/blenderbim/bim/import_ifc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ifcblenderexport/blenderbim/bim/import_ifc.py b/src/ifcblenderexport/blenderbim/bim/import_ifc.py index a02fb1cce0..1dfbcfe26b 100644 --- a/src/ifcblenderexport/blenderbim/bim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/import_ifc.py @@ -699,7 +699,11 @@ class IfcImporter: checkpoint = time.time() shape = iterator.get() if shape: - self.create_product(self.file.by_id(shape.guid), shape) + if shape.context != "Body" and shape.guid in IfcStore.guid_map: + # We only load a single context, and we prioritise the Body context. See #1290. + pass + else: + self.create_product(self.file.by_id(shape.guid), shape) if not iterator.next(): break print("Done creating geometry")