SplitByBuildingStorey - fix errors, fix Bonsai UI #4721

- The patch was failed when executed from Bonsai since self.src wasn't provided, fixed now.
- Added a temporary hack to diplsay file selector for this patch.
- small refactor.
This commit is contained in:
Andrej730
2024-12-05 17:16:21 +05:00
parent 13106d255c
commit 939cc63cae
3 changed files with 53 additions and 16 deletions
+7
View File
@@ -29,3 +29,10 @@ class Patch(bonsai.core.tool.Patch):
{"input": infile, "file": ifcopenshell.open(infile), "recipe": "Migrate", "arguments": [schema]}
)
ifcpatch.write(output, outfile)
@classmethod
def is_filepath_argument(cls, recipe: str, arg_name: str) -> bool:
# TODO: Temporary hack to identify filepath arguments.
# Should mark them as such in the patches documentation
# and process it later.
return recipe == "SplitByBuildingStorey" and arg_name == "output_dir"