Patch recipes can now be performed in-place and are sorted in the UI.

This commit is contained in:
Dion Moult
2023-12-15 23:09:20 +11:00
parent 40e494996d
commit 30fa917e69
2 changed files with 2 additions and 2 deletions
@@ -88,7 +88,7 @@ class ExecuteIfcPatch(bpy.types.Operator):
file = ifcopenshell.open(props.ifc_patch_input)
# Store this in case the patch recipe resets the Blender session, such as by loading a new project.
ifc_patch_output = props.ifc_patch_output
ifc_patch_output = props.ifc_patch_output or props.ifc_patch_input
output = ifcpatch.execute(
{
@@ -53,7 +53,7 @@ def get_ifcpatch_recipes(self, context):
continue
docs = ifcpatch.extract_docs(f, "Patcher", "__init__", ("src", "file", "logger", "args"))
ifcpatchrecipes_enum.append((f, f, docs.get("description", "") if docs else ""))
return ifcpatchrecipes_enum
return sorted(ifcpatchrecipes_enum, key=lambda x: x[0])
def update_ifc_patch_recipe(self, context):