From 85b7249a774014c83f87c7b31f5fc5fdb8a50128 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 26 Nov 2024 17:28:33 +0500 Subject: [PATCH] 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 --- src/bonsai/bonsai/bim/module/drawing/sheeter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/sheeter.py b/src/bonsai/bonsai/bim/module/drawing/sheeter.py index a2048f8ea8..69bd86aac4 100644 --- a/src/bonsai/bonsai/bim/module/drawing/sheeter.py +++ b/src/bonsai/bonsai/bim/module/drawing/sheeter.py @@ -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)