mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Fallback to abs path adding schedule rel path is not available #3106
This commit is contained in:
@@ -1522,7 +1522,10 @@ class AddSchedule(bpy.types.Operator, Operator):
|
|||||||
ifc_path = tool.Ifc.get_path()
|
ifc_path = tool.Ifc.get_path()
|
||||||
if os.path.isfile(ifc_path):
|
if os.path.isfile(ifc_path):
|
||||||
ifc_path = os.path.dirname(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(
|
core.add_schedule(
|
||||||
tool.Ifc,
|
tool.Ifc,
|
||||||
tool.Drawing,
|
tool.Drawing,
|
||||||
|
|||||||
Reference in New Issue
Block a user