mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-07 04:46:25 +00:00
This commit is contained in:
@@ -98,12 +98,6 @@ class ExecuteIfcPatch(bpy.types.Operator):
|
||||
|
||||
if props.should_load_from_memory and tool.Ifc.get():
|
||||
args["file"] = tool.Ifc.get()
|
||||
if ifcpatch.get_patch_input_argument_use(recipe_name) == "REQUIRED":
|
||||
self.report(
|
||||
{"ERROR"},
|
||||
f"The recipe '{recipe_name}' is not currently supported if file is loaded from memory.",
|
||||
)
|
||||
return {"CANCELLED"}
|
||||
else:
|
||||
args["input"] = cast(str, props.ifc_patch_input)
|
||||
args["file"] = cast(ifcopenshell.file, ifcopenshell.open(props.ifc_patch_input))
|
||||
|
||||
@@ -33,10 +33,8 @@ class Patch(bonsai.core.tool.Patch):
|
||||
|
||||
@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"
|
||||
# There is probably a more explicit way to do this
|
||||
return "filepath" in arg_name
|
||||
|
||||
@classmethod
|
||||
def does_patch_has_output(cls, recipe: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user