mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix error using cwd for titleblock path #5769
The titleblock is ifc relative, not .blend/cwd relative. e.g. if you open Blender in C:\ and then would open .ifc from c:\path\to\project.ifc, it would try to create layouts folder in C:\layouts instead of c:\path\to\layouts
This commit is contained in:
@@ -493,7 +493,7 @@ class SheetBuilder:
|
||||
|
||||
def change_titleblock(self, sheet: ifcopenshell.entity_instance, titleblock_name: str) -> None:
|
||||
ootb_titleblock_path = os.path.join(self.data_dir, "templates", "titleblocks", titleblock_name + ".svg")
|
||||
titleblock_path = tool.Drawing.get_default_titleblock_path(titleblock_name)
|
||||
titleblock_path = tool.Ifc.resolve_uri(tool.Drawing.get_default_titleblock_path(titleblock_name))
|
||||
sheet_path = tool.Drawing.get_document_uri(sheet, "LAYOUT")
|
||||
sheet_dir = os.path.dirname(sheet_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user