Fallback to abs path adding schedule rel path is not available #3106

This commit is contained in:
Andrej730
2023-05-04 11:32:05 +05:00
parent b37705ab6e
commit 75e9c3265d
@@ -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,