mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
biim.load_link - error if file does not exist
Noticed investigating #6403
This commit is contained in:
@@ -1304,6 +1304,9 @@ class LoadLink(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
filepath = Path(tool.Ifc.resolve_uri(self.filepath))
|
filepath = Path(tool.Ifc.resolve_uri(self.filepath))
|
||||||
|
if not filepath.exists():
|
||||||
|
self.report({"ERROR"}, f"File does not exist: '{filepath}'")
|
||||||
|
return {"CANCELLED"}
|
||||||
self.filepath_ = filepath
|
self.filepath_ = filepath
|
||||||
if filepath.suffix.lower().endswith(".blend"):
|
if filepath.suffix.lower().endswith(".blend"):
|
||||||
self.link_blend(filepath)
|
self.link_blend(filepath)
|
||||||
|
|||||||
Reference in New Issue
Block a user