From 9311f50206acef37d65f62a5c635f5ebb6406ae1 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 25 Mar 2025 11:53:44 +0500 Subject: [PATCH] Fix for 4594f596c2 Traceback: ``` Error: Python: Traceback (most recent call last): File "\bonsai\bim\module\project\operator.py", line 127, in execute self._execute(context) File "\bonsai\bim\module\project\operator.py", line 143, in _execute core.create_project( File "\bonsai\core\project.py", line 108, in create_project project.append_all_types_from_template(template) File "\bonsai\tool\project.py", line 55, in append_all_types_from_template bpy.ops.bim.select_library_file(filepath=filepath.__str__()) File "\Blender\4.4\scripts\modules\bpy\ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Converting py args to operator properties:: keyword "filepath" unrecognized ``` --- src/bonsai/bonsai/bim/ui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/bim/ui.py b/src/bonsai/bonsai/bim/ui.py index 4223706b8a..a6e8d2b25f 100644 --- a/src/bonsai/bonsai/bim/ui.py +++ b/src/bonsai/bonsai/bim/ui.py @@ -39,8 +39,10 @@ from typing import Optional, TYPE_CHECKING class IFCFileSelector: - filepath: str - use_relative_path: bool + # Avoid overriding blender prop annotations at runtime. + if TYPE_CHECKING: + filepath: str + use_relative_path: bool def is_existing_ifc_file(self, filepath: Optional[str] = None) -> bool: """Check if file path exists and if it's an IFC file.