From 123d023bb3c6864b91d0ec7a3f6a9c6980315091 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 27 Sep 2024 11:45:37 +0500 Subject: [PATCH] context.operator - remove unnecessary ifc operators --- src/bonsai/bonsai/bim/module/context/operator.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/context/operator.py b/src/bonsai/bonsai/bim/module/context/operator.py index 808cc55159..fbf1f17963 100644 --- a/src/bonsai/bonsai/bim/module/context/operator.py +++ b/src/bonsai/bonsai/bim/module/context/operator.py @@ -54,23 +54,25 @@ class RemoveContext(bpy.types.Operator, tool.Ifc.Operator): core.remove_context(tool.Ifc, context=tool.Ifc.get().by_id(self.context)) -class EnableEditingContext(bpy.types.Operator, tool.Ifc.Operator): +class EnableEditingContext(bpy.types.Operator): bl_idname = "bim.enable_editing_context" bl_label = "Enable Editing Context" bl_options = {"REGISTER", "UNDO"} context: bpy.props.IntProperty() - def _execute(self, context): + def execute(self, context): core.enable_editing_context(tool.Context, context=tool.Ifc.get().by_id(self.context)) + return {"FINISHED"} -class DisableEditingContext(bpy.types.Operator, tool.Ifc.Operator): +class DisableEditingContext(bpy.types.Operator): bl_idname = "bim.disable_editing_context" bl_label = "Disable Editing Context" bl_options = {"REGISTER", "UNDO"} - def _execute(self, context): + def execute(self, context): core.disable_editing_context(tool.Context) + return {"FINISHED"} class EditContext(bpy.types.Operator, tool.Ifc.Operator):