From 75e9c3265d955722425f20f6b2f85630d7f7ca96 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 4 May 2023 11:32:05 +0500 Subject: [PATCH] Fallback to abs path adding schedule rel path is not available #3106 --- src/blenderbim/blenderbim/bim/module/drawing/operator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/module/drawing/operator.py b/src/blenderbim/blenderbim/bim/module/drawing/operator.py index 1f8844974b..588b7d5ab3 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/operator.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/operator.py @@ -1522,7 +1522,10 @@ class AddSchedule(bpy.types.Operator, Operator): ifc_path = tool.Ifc.get_path() if os.path.isfile(ifc_path): ifc_path = os.path.dirname(ifc_path) - filepath = os.path.relpath(filepath, ifc_path) + + # taking into account different drives on windows + if Path(filepath).drive == Path(ifc_path).drive: + filepath = os.path.relpath(filepath, ifc_path) core.add_schedule( tool.Ifc, tool.Drawing,