diff --git a/src/bonsai/bonsai/bim/module/drawing/operator.py b/src/bonsai/bonsai/bim/module/drawing/operator.py index fa17be9fb5..34407adc9d 100644 --- a/src/bonsai/bonsai/bim/module/drawing/operator.py +++ b/src/bonsai/bonsai/bim/module/drawing/operator.py @@ -3886,8 +3886,7 @@ class AddReferenceImage(bpy.types.Operator, tool.Ifc.Operator, ImportHelper): image_filepath = Path(tool.Ifc.get_uri(self.filepath, use_relative_path=self.use_relative_path)) ifc_file = tool.Ifc.get() - params = {"check_existing": False} - image = load_image(abs_path.name, str(abs_path.parent), **params) + image = load_image(abs_path.name, str(abs_path.parent), check_existing=False) mesh = bpy.data.meshes.new(image_filepath.stem) obj = bpy.data.objects.new(image_filepath.stem, mesh) diff --git a/src/bonsai/test/bim/feature/drawing.feature b/src/bonsai/test/bim/feature/drawing.feature index b7b78e748d..8038b68a5d 100644 --- a/src/bonsai/test/bim/feature/drawing.feature +++ b/src/bonsai/test/bim/feature/drawing.feature @@ -313,6 +313,6 @@ Scenario: Create sheet - with a drawing added to it Scenario: Add reference image Given an empty IFC project And I save IFC project - When I press "bim.add_reference_image(filepath='{cwd}/test/files/image.jpg')" + When I press "bim.add_reference_image(filepath='{cwd}/test/files/image.jpg', x_length=1, y_length=0.565)" Then the object "IfcAnnotation/image" exists And the object "IfcAnnotation/image" dimensions are "1.0,0.565,0."