From eaaa18468aea82762a144fca83e994bc5424acb9 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 6 Sep 2024 17:45:18 +0500 Subject: [PATCH] Reuse tool.Ifc.Operator --- .../bonsai/bim/module/boundary/operator.py | 10 ++------ .../bonsai/bim/module/constraint/operator.py | 25 ++++--------------- .../bonsai/bim/module/debug/operator.py | 5 +--- .../bonsai/bim/module/geometry/operator.py | 20 +++------------ .../bonsai/bim/module/layer/operator.py | 25 ++++--------------- src/bonsai/bonsai/bim/module/model/product.py | 5 +--- .../bonsai/bim/module/project/operator.py | 15 +++-------- src/bonsai/bonsai/bim/module/pset/operator.py | 15 +++-------- src/bonsai/bonsai/bim/module/root/operator.py | 10 ++------ .../bonsai/bim/module/sequence/operator.py | 15 +++-------- src/bonsai/bonsai/bim/module/type/operator.py | 5 +--- src/bonsai/bonsai/bim/module/void/operator.py | 5 +--- 12 files changed, 30 insertions(+), 125 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/boundary/operator.py b/src/bonsai/bonsai/bim/module/boundary/operator.py index 92bceb930b..d29c50cf69 100644 --- a/src/bonsai/bonsai/bim/module/boundary/operator.py +++ b/src/bonsai/bonsai/bim/module/boundary/operator.py @@ -391,14 +391,11 @@ class DisableEditingBoundary(bpy.types.Operator): return {"FINISHED"} -class EditBoundaryAttributes(bpy.types.Operator): +class EditBoundaryAttributes(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.edit_boundary_attributes" bl_label = "Disable Editing Boundary Relations" bl_options = {"REGISTER", "UNDO"} - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): bprops = context.active_object.bim_boundary_properties boundary = tool.Ifc.get_entity(context.active_object) @@ -412,7 +409,7 @@ class EditBoundaryAttributes(bpy.types.Operator): return {"FINISHED"} -class UpdateBoundaryGeometry(bpy.types.Operator): +class UpdateBoundaryGeometry(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.update_boundary_geometry" bl_label = "Update Boundary Geometry" bl_description = """ @@ -421,9 +418,6 @@ class UpdateBoundaryGeometry(bpy.types.Operator): """ bl_options = {"REGISTER", "UNDO"} - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): tool.Boundary.move_origin_to_space_origin(context.active_object) settings = tool.Boundary.get_assign_connection_geometry_settings(context.active_object) diff --git a/src/bonsai/bonsai/bim/module/constraint/operator.py b/src/bonsai/bonsai/bim/module/constraint/operator.py index 78c48775e0..ccd203ee15 100644 --- a/src/bonsai/bonsai/bim/module/constraint/operator.py +++ b/src/bonsai/bonsai/bim/module/constraint/operator.py @@ -77,14 +77,11 @@ class DisableEditingConstraint(bpy.types.Operator): return {"FINISHED"} -class AddObjective(bpy.types.Operator): +class AddObjective(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.add_objective" bl_label = "Add Objective" bl_options = {"REGISTER", "UNDO"} - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): result = ifcopenshell.api.run("constraint.add_objective", IfcStore.get_file()) bpy.ops.bim.load_objectives() @@ -92,14 +89,11 @@ class AddObjective(bpy.types.Operator): return {"FINISHED"} -class EditObjective(bpy.types.Operator): +class EditObjective(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.edit_objective" bl_label = "Edit Objective" bl_options = {"REGISTER", "UNDO"} - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): props = context.scene.BIMConstraintProperties attributes = {} @@ -120,15 +114,12 @@ class EditObjective(bpy.types.Operator): return {"FINISHED"} -class RemoveConstraint(bpy.types.Operator): +class RemoveConstraint(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.remove_constraint" bl_label = "Remove Constraint" bl_options = {"REGISTER", "UNDO"} constraint: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): props = context.scene.BIMConstraintProperties self.file = IfcStore.get_file() @@ -168,16 +159,13 @@ class DisableAssigningConstraint(bpy.types.Operator): return {"FINISHED"} -class AssignConstraint(bpy.types.Operator): +class AssignConstraint(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.assign_constraint" bl_label = "Assign Constraint" bl_options = {"REGISTER", "UNDO"} obj: bpy.props.StringProperty() constraint: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): self.file = tool.Ifc.get() objs = [bpy.data.objects.get(self.obj)] if self.obj else context.selected_objects @@ -194,16 +182,13 @@ class AssignConstraint(bpy.types.Operator): return {"FINISHED"} -class UnassignConstraint(bpy.types.Operator): +class UnassignConstraint(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.unassign_constraint" bl_label = "Unassign Constraint" bl_options = {"REGISTER", "UNDO"} obj: bpy.props.StringProperty() constraint: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): self.file = tool.Ifc.get() objs = [bpy.data.objects.get(self.obj)] if self.obj else context.selected_objects diff --git a/src/bonsai/bonsai/bim/module/debug/operator.py b/src/bonsai/bonsai/bim/module/debug/operator.py index 85d5efd61d..44c4eef5da 100644 --- a/src/bonsai/bonsai/bim/module/debug/operator.py +++ b/src/bonsai/bonsai/bim/module/debug/operator.py @@ -224,7 +224,7 @@ class CreateAllShapes(bpy.types.Operator): return {"FINISHED"} -class CreateShapeFromStepId(bpy.types.Operator): +class CreateShapeFromStepId(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.create_shape_from_step_id" bl_label = "Create Shape From STEP ID" bl_description = "Recreate a mesh object from a STEP ID" @@ -236,9 +236,6 @@ class CreateShapeFromStepId(bpy.types.Operator): def poll(cls, context): return IfcStore.get_file() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): logger = logging.getLogger("ImportIFC") self.ifc_import_settings = import_ifc.IfcImportSettings.factory(context, IfcStore.path, logger) diff --git a/src/bonsai/bonsai/bim/module/geometry/operator.py b/src/bonsai/bonsai/bim/module/geometry/operator.py index 14429d878f..656f16d8b1 100644 --- a/src/bonsai/bonsai/bim/module/geometry/operator.py +++ b/src/bonsai/bonsai/bim/module/geometry/operator.py @@ -1233,7 +1233,7 @@ class DuplicateLinkedAggregateTo3dCursor(bpy.types.Operator): ) -class RefreshLinkedAggregate(bpy.types.Operator): +class RefreshLinkedAggregate(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.refresh_linked_aggregate" bl_label = "IFC Refresh Linked Aggregate" bl_options = {"REGISTER", "UNDO"} @@ -1242,14 +1242,6 @@ class RefreshLinkedAggregate(bpy.types.Operator): def poll(cls, context): return len(context.selected_objects) > 0 - def execute(self, context): - # Deep magick from the dawn of time - if IfcStore.get_file(): - IfcStore.execute_ifc_operator(self, context) - return {"FINISHED"} - - return {"FINISHED"} - def _execute(self, context): self.new_active_obj = None self.group_name = "BBIM_Linked_Aggregate" @@ -1576,15 +1568,12 @@ class OverridePasteBuffer(bpy.types.Operator): return {"FINISHED"} -class OverrideModeSetEdit(bpy.types.Operator): +class OverrideModeSetEdit(bpy.types.Operator, tool.Ifc.Operator): bl_description = "Switch from Object mode to Edit mode" bl_idname = "bim.override_mode_set_edit" bl_label = "IFC Mode Set Edit" bl_options = {"REGISTER", "UNDO"} - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): selected_objs = tool.Blender.get_selected_objects() active_obj = context.active_object @@ -1702,15 +1691,12 @@ class OverrideModeSetEdit(bpy.types.Operator): return self.execute(context) -class OverrideModeSetObject(bpy.types.Operator): +class OverrideModeSetObject(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.override_mode_set_object" bl_label = "IFC Mode Set Object" bl_options = {"REGISTER", "UNDO"} should_save: bpy.props.BoolProperty(name="Should Save", default=True) - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): if not context.active_object: return {"FINISHED"} diff --git a/src/bonsai/bonsai/bim/module/layer/operator.py b/src/bonsai/bonsai/bim/module/layer/operator.py index f5d62bf70f..c633b50315 100644 --- a/src/bonsai/bonsai/bim/module/layer/operator.py +++ b/src/bonsai/bonsai/bim/module/layer/operator.py @@ -78,14 +78,11 @@ class DisableEditingLayer(bpy.types.Operator): return {"FINISHED"} -class AddPresentationLayer(bpy.types.Operator): +class AddPresentationLayer(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.add_presentation_layer" bl_label = "Add Layer" bl_options = {"REGISTER", "UNDO"} - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): result = ifcopenshell.api.run("layer.add_layer", IfcStore.get_file()) bpy.ops.bim.load_layers() @@ -93,14 +90,11 @@ class AddPresentationLayer(bpy.types.Operator): return {"FINISHED"} -class EditPresentationLayer(bpy.types.Operator): +class EditPresentationLayer(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.edit_presentation_layer" bl_label = "Edit Layer" bl_options = {"REGISTER", "UNDO"} - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): props = context.scene.BIMLayerProperties attributes = {} @@ -117,15 +111,12 @@ class EditPresentationLayer(bpy.types.Operator): return {"FINISHED"} -class RemovePresentationLayer(bpy.types.Operator): +class RemovePresentationLayer(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.remove_presentation_layer" bl_label = "Remove Presentation Layer" bl_options = {"REGISTER", "UNDO"} layer: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): props = context.scene.BIMLayerProperties self.file = IfcStore.get_file() @@ -134,7 +125,7 @@ class RemovePresentationLayer(bpy.types.Operator): return {"FINISHED"} -class AssignPresentationLayer(bpy.types.Operator): +class AssignPresentationLayer(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.assign_presentation_layer" bl_label = "Assign Presentation Layer" bl_description = "Assign presentation layer to the active representation of the active object" @@ -142,9 +133,6 @@ class AssignPresentationLayer(bpy.types.Operator): item: bpy.props.StringProperty() layer: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): item = bpy.data.meshes.get(self.item) if self.item else context.active_object.data self.file = IfcStore.get_file() @@ -159,7 +147,7 @@ class AssignPresentationLayer(bpy.types.Operator): return {"FINISHED"} -class UnassignPresentationLayer(bpy.types.Operator): +class UnassignPresentationLayer(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.unassign_presentation_layer" bl_label = "Unassign Presentation Layer" bl_description = "Unassign presentation layer from the active representation of the active object" @@ -167,9 +155,6 @@ class UnassignPresentationLayer(bpy.types.Operator): item: bpy.props.StringProperty() layer: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): item = bpy.data.meshes.get(self.item) if self.item else context.active_object.data self.file = IfcStore.get_file() diff --git a/src/bonsai/bonsai/bim/module/model/product.py b/src/bonsai/bonsai/bim/module/model/product.py index b7914071e9..5f6e35773b 100644 --- a/src/bonsai/bonsai/bim/module/model/product.py +++ b/src/bonsai/bonsai/bim/module/model/product.py @@ -112,7 +112,7 @@ class AddDefaultType(bpy.types.Operator, tool.Ifc.Operator): bpy.ops.bim.add_type() -class AddConstrTypeInstance(bpy.types.Operator): +class AddConstrTypeInstance(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.add_constr_type_instance" bl_label = "Add" bl_options = {"REGISTER", "UNDO"} @@ -123,9 +123,6 @@ class AddConstrTypeInstance(bpy.types.Operator): def invoke(self, context, event): return self.execute(context) - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): props = context.scene.BIMModelProperties relating_type_id = self.relating_type_id or props.relating_type_id diff --git a/src/bonsai/bonsai/bim/module/project/operator.py b/src/bonsai/bonsai/bim/module/project/operator.py index 1d76170979..f8acb4d7e1 100644 --- a/src/bonsai/bonsai/bim/module/project/operator.py +++ b/src/bonsai/bonsai/bim/module/project/operator.py @@ -367,7 +367,7 @@ class SaveLibraryFile(bpy.types.Operator): return {"FINISHED"} -class AppendEntireLibrary(bpy.types.Operator): +class AppendEntireLibrary(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.append_entire_library" bl_label = "Append Entire Library" @@ -375,9 +375,6 @@ class AppendEntireLibrary(bpy.types.Operator): def poll(cls, context): return IfcStore.get_file() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): self.file = IfcStore.get_file() self.library = IfcStore.library_file @@ -389,7 +386,7 @@ class AppendEntireLibrary(bpy.types.Operator): return {"FINISHED"} -class AppendLibraryElementByQuery(bpy.types.Operator): +class AppendLibraryElementByQuery(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.append_library_element_by_query" bl_label = "Append Library Element By Query" query: bpy.props.StringProperty(name="Query") @@ -398,9 +395,6 @@ class AppendLibraryElementByQuery(bpy.types.Operator): def poll(cls, context): return IfcStore.get_file() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): self.file = IfcStore.get_file() self.library = IfcStore.library_file @@ -416,7 +410,7 @@ class AppendLibraryElementByQuery(bpy.types.Operator): self.layout.prop(self, "query") -class AppendLibraryElement(bpy.types.Operator): +class AppendLibraryElement(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.append_library_element" bl_label = "Append Library Element" bl_options = {"REGISTER", "UNDO"} @@ -431,9 +425,6 @@ class AppendLibraryElement(bpy.types.Operator): cls.poll_message_set("Please create or load a project first.") return poll - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): self.file = IfcStore.get_file() element = ifcopenshell.api.run( diff --git a/src/bonsai/bonsai/bim/module/pset/operator.py b/src/bonsai/bonsai/bim/module/pset/operator.py index 8940e60a59..5870547bce 100644 --- a/src/bonsai/bonsai/bim/module/pset/operator.py +++ b/src/bonsai/bonsai/bim/module/pset/operator.py @@ -305,15 +305,12 @@ class BIM_OT_clear_list(bpy.types.Operator): return {"FINISHED"} -class BIM_OT_rename_parameters(bpy.types.Operator): +class BIM_OT_rename_parameters(bpy.types.Operator, tool.Ifc.Operator): bl_label = "Rename Parameters" bl_idname = "bim.rename_parameters" bl_options = {"REGISTER", "UNDO"} bl_description = "Rename parameters that are subclasses of IfcElement" - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): props_to_map = context.scene.RenameProperties ifc_file = IfcStore.get_file() @@ -342,15 +339,12 @@ class BIM_OT_rename_parameters(bpy.types.Operator): obj_prop.Name = prop2map.new_property_name -class BIM_OT_add_edit_custom_property(bpy.types.Operator): +class BIM_OT_add_edit_custom_property(bpy.types.Operator, tool.Ifc.Operator): bl_label = "Add or Edit a Custom Property" bl_idname = "bim.add_edit_custom_property" bl_options = {"REGISTER", "UNDO"} index: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): self.file = IfcStore.get_file() props = context.scene.AddEditProperties @@ -399,16 +393,13 @@ class BIM_OT_add_edit_custom_property(bpy.types.Operator): return prop_enum_value -class BIM_OT_bulk_remove_psets(bpy.types.Operator): +class BIM_OT_bulk_remove_psets(bpy.types.Operator, tool.Ifc.Operator): bl_label = "Bulk Remove Psets from Selected Objects" bl_idname = "bim.bulk_remove_psets" bl_options = {"REGISTER", "UNDO"} bl_description = "Bulk remove psets from selected objects" index: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): self.file = IfcStore.get_file() props = context.scene.DeletePsets diff --git a/src/bonsai/bonsai/bim/module/root/operator.py b/src/bonsai/bonsai/bim/module/root/operator.py index 62586e8c30..18aa7e5654 100644 --- a/src/bonsai/bonsai/bim/module/root/operator.py +++ b/src/bonsai/bonsai/bim/module/root/operator.py @@ -74,16 +74,13 @@ class DisableReassignClass(bpy.types.Operator): return {"FINISHED"} -class ReassignClass(bpy.types.Operator): +class ReassignClass(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.reassign_class" bl_label = "Reassign IFC Class" bl_description = "Reassign IFC class for selected objects" bl_options = {"REGISTER", "UNDO"} obj: bpy.props.StringProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): if self.obj: objects = [bpy.data.objects.get(self.obj)] @@ -211,7 +208,7 @@ class AssignClass(bpy.types.Operator, tool.Ifc.Operator): context.view_layer.objects.active = active_object -class UnlinkObject(bpy.types.Operator): +class UnlinkObject(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.unlink_object" bl_label = "Unlink Object" bl_description = ( @@ -225,9 +222,6 @@ class UnlinkObject(bpy.types.Operator): should_delete: bpy.props.BoolProperty(name="Delete IFC Element", default=True) skip_invoke: bpy.props.BoolProperty(default=False, options={"SKIP_SAVE"}) - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): if self.obj: objects = [bpy.data.objects.get(self.obj)] diff --git a/src/bonsai/bonsai/bim/module/sequence/operator.py b/src/bonsai/bonsai/bim/module/sequence/operator.py index 32c6b8fa33..ba05a3a31d 100644 --- a/src/bonsai/bonsai/bim/module/sequence/operator.py +++ b/src/bonsai/bonsai/bim/module/sequence/operator.py @@ -523,7 +523,7 @@ class AssignProcess(bpy.types.Operator, tool.Ifc.Operator): pass # TODO -class UnassignProcess(bpy.types.Operator): +class UnassignProcess(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.unassign_process" bl_label = "Unassign Process" bl_options = {"REGISTER", "UNDO"} @@ -532,9 +532,6 @@ class UnassignProcess(bpy.types.Operator): related_object: bpy.props.IntProperty() resource: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): if self.related_object_type == "RESOURCE": core.unassign_resource( @@ -877,16 +874,13 @@ class RemoveWorkTime(bpy.types.Operator, tool.Ifc.Operator): return {"FINISHED"} -class AssignRecurrencePattern(bpy.types.Operator): +class AssignRecurrencePattern(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.assign_recurrence_pattern" bl_label = "Assign Recurrence Pattern" bl_options = {"REGISTER", "UNDO"} work_time: bpy.props.IntProperty() recurrence_type: bpy.props.StringProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): core.assign_recurrence_pattern( tool.Ifc, work_time=tool.Ifc.get().by_id(self.work_time), recurrence_type=self.recurrence_type @@ -894,15 +888,12 @@ class AssignRecurrencePattern(bpy.types.Operator): return {"FINISHED"} -class UnassignRecurrencePattern(bpy.types.Operator): +class UnassignRecurrencePattern(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.unassign_recurrence_pattern" bl_label = "Unassign Recurrence Pattern" bl_options = {"REGISTER", "UNDO"} recurrence_pattern: bpy.props.IntProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): core.unassign_recurrence_pattern(tool.Ifc, recurrence_pattern=tool.Ifc.get().by_id(self.recurrence_pattern)) return {"FINISHED"} diff --git a/src/bonsai/bonsai/bim/module/type/operator.py b/src/bonsai/bonsai/bim/module/type/operator.py index 31db2fdd98..c72cebcf71 100644 --- a/src/bonsai/bonsai/bim/module/type/operator.py +++ b/src/bonsai/bonsai/bim/module/type/operator.py @@ -53,15 +53,12 @@ class AssignType(bpy.types.Operator, tool.Ifc.Operator): obj.name = tool.Model.generate_occurrence_name(type, element.is_a()) -class UnassignType(bpy.types.Operator): +class UnassignType(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.unassign_type" bl_label = "Unassign Type" bl_options = {"REGISTER", "UNDO"} related_object: bpy.props.StringProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): def exclude_callback(attribute): return attribute.is_a("IfcProfileDef") and attribute.ProfileName diff --git a/src/bonsai/bonsai/bim/module/void/operator.py b/src/bonsai/bonsai/bim/module/void/operator.py index 18fe3407ca..8f52352419 100644 --- a/src/bonsai/bonsai/bim/module/void/operator.py +++ b/src/bonsai/bonsai/bim/module/void/operator.py @@ -175,16 +175,13 @@ class RemoveOpening(bpy.types.Operator, tool.Ifc.Operator): return {"FINISHED"} -class AddFilling(bpy.types.Operator): +class AddFilling(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.add_filling" bl_label = "Add Filling" bl_options = {"REGISTER", "UNDO"} opening: bpy.props.StringProperty() obj: bpy.props.StringProperty() - def execute(self, context): - return IfcStore.execute_ifc_operator(self, context) - def _execute(self, context): obj = context.scene.objects.get(self.obj, context.active_object) opening = context.scene.objects.get(self.opening, context.scene.VoidProperties.desired_opening)