From 4ea9a598c700185232cae1f4cdf9b18196eda094 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 16 May 2025 19:39:24 +0500 Subject: [PATCH] operator.drawing - remove unnecessary ifc operators --- src/bonsai/bonsai/bim/module/drawing/operator.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/operator.py b/src/bonsai/bonsai/bim/module/drawing/operator.py index d773fc55d6..8c7ea0c65d 100644 --- a/src/bonsai/bonsai/bim/module/drawing/operator.py +++ b/src/bonsai/bonsai/bim/module/drawing/operator.py @@ -117,22 +117,24 @@ class AddAnnotationType(bpy.types.Operator, tool.Ifc.Operator): bpy.ops.bim.add_reference_image("INVOKE_DEFAULT", use_existing_object_by_name=obj.name) -class EnableAddAnnotationType(bpy.types.Operator, tool.Ifc.Operator): +class EnableAddAnnotationType(bpy.types.Operator): bl_idname = "bim.enable_add_annotation_type" bl_label = "Enable Add Annotation Type" bl_options = {"REGISTER", "UNDO"} - def _execute(self, context): + def execute(self, context) -> "set[rna_enums.OperatorReturnItems]": tool.Drawing.get_annotation_props().is_adding_type = True + return {"FINISHED"} -class DisableAddAnnotationType(bpy.types.Operator, tool.Ifc.Operator): +class DisableAddAnnotationType(bpy.types.Operator): bl_idname = "bim.disable_add_annotation_type" bl_label = "Disable Add Annotation Type" bl_options = {"REGISTER", "UNDO"} - def _execute(self, context): + def execute(self, context) -> "set[rna_enums.OperatorReturnItems]": tool.Drawing.get_annotation_props().is_adding_type = False + return {"FINISHED"} class AddDrawing(bpy.types.Operator, tool.Ifc.Operator):