mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Fix regression where changing logic to occur in filesystem selector caused headless test to fail.
See d4388ec76
This commit is contained in:
@@ -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))
|
image_filepath = Path(tool.Ifc.get_uri(self.filepath, use_relative_path=self.use_relative_path))
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
|
|
||||||
params = {"check_existing": False}
|
image = load_image(abs_path.name, str(abs_path.parent), check_existing=False)
|
||||||
image = load_image(abs_path.name, str(abs_path.parent), **params)
|
|
||||||
|
|
||||||
mesh = bpy.data.meshes.new(image_filepath.stem)
|
mesh = bpy.data.meshes.new(image_filepath.stem)
|
||||||
obj = bpy.data.objects.new(image_filepath.stem, mesh)
|
obj = bpy.data.objects.new(image_filepath.stem, mesh)
|
||||||
|
|||||||
@@ -313,6 +313,6 @@ Scenario: Create sheet - with a drawing added to it
|
|||||||
Scenario: Add reference image
|
Scenario: Add reference image
|
||||||
Given an empty IFC project
|
Given an empty IFC project
|
||||||
And I save 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
|
Then the object "IfcAnnotation/image" exists
|
||||||
And the object "IfcAnnotation/image" dimensions are "1.0,0.565,0."
|
And the object "IfcAnnotation/image" dimensions are "1.0,0.565,0."
|
||||||
|
|||||||
Reference in New Issue
Block a user