From 0cef788a09d19bf65e6fc9945abed29e364a6a31 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 4 Oct 2024 17:06:28 +0500 Subject: [PATCH] Fix console errors after c96c661 (failed to register selection_mode) Apparently Blender is strict that items should be tuples, not lists. Interestingly enough, though it did failed to register, operator still was working fine. Example error: TypeError: EnumProperty(...): expected a tuple containing (identifier, name, description) and optionally an icon name and unique number ValueError: bpy_struct "BIM_OT_select_container" registration error: 'selection_mode' EnumProperty could not register (see previous error) --- src/bonsai/bonsai/bim/module/spatial/operator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/spatial/operator.py b/src/bonsai/bonsai/bim/module/spatial/operator.py index f8620e2d53..2ff0689225 100644 --- a/src/bonsai/bonsai/bim/module/spatial/operator.py +++ b/src/bonsai/bonsai/bim/module/spatial/operator.py @@ -161,7 +161,7 @@ class SelectContainer(bpy.types.Operator, tool.Ifc.Operator): bl_options = {"REGISTER", "UNDO"} bl_description = "SHIFT + Click to add container to selection\nALT + Click to remove container from selection" container: bpy.props.IntProperty() - selection_mode: bpy.props.EnumProperty(items=[["ADD"] * 3, ["REMOVE"] * 3, ["SINGLE" * 3]]) + selection_mode: bpy.props.EnumProperty(items=[("ADD",) * 3, ("REMOVE",) * 3, ("SINGLE",) * 3]) def invoke(self, context, event): if event.shift: