Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit 8da9255

Browse files
committed
Fix bug where deletion syncing may fail on freshly created objects
1 parent 761b4c0 commit 8da9255

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/blenderbim/blenderbim/bim/export_ifc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,19 @@ def sync_object_placements_and_deletions(self):
7777
self.unit_scale = ifcopenshell.util.unit.calculate_unit_scale(self.file)
7878
to_delete = []
7979

80-
for guid, obj in IfcStore.guid_map.items():
80+
for ifc_definition_id, obj in IfcStore.id_map.items():
8181
try:
8282
self.sync_object_placement(obj)
83-
self.sync_object_container(guid, obj)
83+
self.sync_object_container(ifc_definition_id, obj)
8484
except ReferenceError:
8585
pass # The object is likely deleted
8686
if self.should_delete(obj):
87-
to_delete.append(guid)
87+
to_delete.append(ifc_definition_id)
8888

8989
SpatialData.purge()
9090

91-
for guid in to_delete:
92-
product = self.file.by_id(guid)
91+
for ifc_definition_id in to_delete:
92+
product = self.file.by_id(ifc_definition_id)
9393
IfcStore.unlink_element(product)
9494
ifcopenshell.api.run("root.remove_product", self.file, **{"product": product})
9595

0 commit comments

Comments
 (0)