From a4979a74b24af20299e3a9294d2274a0566841fb Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 28 Oct 2024 14:04:04 +0500 Subject: [PATCH] Fix bug object position wouldn't be synced on project save If project had scale and openings then bim.update_representation wouldn't apply it's position leading to unsynced position. --- src/bonsai/bonsai/bim/export_ifc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/export_ifc.py b/src/bonsai/bonsai/bim/export_ifc.py index 4f84e6e177..72b0baa8ec 100644 --- a/src/bonsai/bonsai/bim/export_ifc.py +++ b/src/bonsai/bonsai/bim/export_ifc.py @@ -149,7 +149,11 @@ class IfcExporter: if tool.Geometry.is_scaled(obj): print(f"WARNING. Object '{obj.name}' scales ({obj.scale[:]}) are reset during project save.") obj.scale = (1.0, 1.0, 1.0) - return element + else: + # Return and don't handle is_moved as + # updata_representation will run edit_object_placement if object is scaled + # and had no openings. + return element if not tool.Ifc.is_moved(obj): return if element.is_a("IfcGridAxis"):