mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 18:16:20 +00:00
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:
@@ -161,7 +161,7 @@ class SelectContainer(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "SHIFT + Click to add container to selection\nALT + Click to remove container from selection"
|
bl_description = "SHIFT + Click to add container to selection\nALT + Click to remove container from selection"
|
||||||
container: bpy.props.IntProperty()
|
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):
|
def invoke(self, context, event):
|
||||||
if event.shift:
|
if event.shift:
|
||||||
|
|||||||
Reference in New Issue
Block a user