From 667ac307c38e22b754e99940a28d26c38a58fb82 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 22 Feb 2021 18:16:09 +1100 Subject: [PATCH] Fix bug where cursor was not placed in the correct unit after a global->local coordinate conversion --- .../blenderbim/bim/module/georeference/operator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ifcblenderexport/blenderbim/bim/module/georeference/operator.py b/src/ifcblenderexport/blenderbim/bim/module/georeference/operator.py index 79e5e4d1bf..c0104cd53f 100644 --- a/src/ifcblenderexport/blenderbim/bim/module/georeference/operator.py +++ b/src/ifcblenderexport/blenderbim/bim/module/georeference/operator.py @@ -284,6 +284,8 @@ class ConvertGlobalToLocal(bpy.types.Operator): ) props.coordinate_output = ",".join([str(r) for r in results]) - bpy.context.scene.cursor.location = results + + scale = ifcopenshell.util.unit.calculate_unit_scale(IfcStore.get_file()) + bpy.context.scene.cursor.location = (results[0] * scale, results[1] * scale, results[2] * scale) return {"FINISHED"}