From 7322cc901898463e01949c3436b9d56d534120fa Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 25 Jul 2025 12:38:18 +0500 Subject: [PATCH] bim.create_shape_from_step_id - use cursor as the location for the shapes --- src/bonsai/bonsai/bim/module/debug/operator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bonsai/bonsai/bim/module/debug/operator.py b/src/bonsai/bonsai/bim/module/debug/operator.py index 7e89eda418..d2941d8cf0 100644 --- a/src/bonsai/bonsai/bim/module/debug/operator.py +++ b/src/bonsai/bonsai/bim/module/debug/operator.py @@ -348,6 +348,7 @@ class CreateShapeFromStepId(bpy.types.Operator): return True def execute(self, context): + assert context.scene geometry_library = self.custom_geometry_library or self.geometry_library logger = logging.getLogger("ImportIFC") self.ifc_import_settings = import_ifc.IfcImportSettings.factory(context, IfcStore.path, logger) @@ -365,6 +366,7 @@ class CreateShapeFromStepId(bpy.types.Operator): else: mesh = None obj = bpy.data.objects.new(f"Debug/{element.is_a()}/{element.id()}", mesh) + obj.location = context.scene.cursor.location context.scene.collection.objects.link(obj) return {"FINISHED"}