biim.load_link - error if file does not exist

Noticed investigating #6403
This commit is contained in:
Andrej730
2025-04-02 12:41:34 +05:00
parent 9316e0bff0
commit 0990dfd372
@@ -1304,6 +1304,9 @@ class LoadLink(bpy.types.Operator):
def execute(self, context):
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
if filepath.suffix.lower().endswith(".blend"):
self.link_blend(filepath)