mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Patch recipes can now be performed in-place and are sorted in the UI.
This commit is contained in:
@@ -88,7 +88,7 @@ class ExecuteIfcPatch(bpy.types.Operator):
|
|||||||
file = ifcopenshell.open(props.ifc_patch_input)
|
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.
|
# 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(
|
output = ifcpatch.execute(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def get_ifcpatch_recipes(self, context):
|
|||||||
continue
|
continue
|
||||||
docs = ifcpatch.extract_docs(f, "Patcher", "__init__", ("src", "file", "logger", "args"))
|
docs = ifcpatch.extract_docs(f, "Patcher", "__init__", ("src", "file", "logger", "args"))
|
||||||
ifcpatchrecipes_enum.append((f, f, docs.get("description", "") if docs else ""))
|
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):
|
def update_ifc_patch_recipe(self, context):
|
||||||
|
|||||||
Reference in New Issue
Block a user