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)
This commit is contained in:
Andrej730
2024-10-04 17:06:28 +05:00
parent 38d450e111
commit 0cef788a09
@@ -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: