📋 Metadata

💬 Content

Michael_Knubben:

It also makes deselecting by clicking outside the object stop functioning

Replace the code with:

bpy.ops.view3d.select(deselect_all=True)

Michael_Knubben:

Is there a way to make it so holding lmb in place makes the dropdown show up, but dragging lets me box or lasso select (depending on selected tool)?

Yes, add a Stack Key with the same keymap ( Object Mode ), same hotkey ( LMB ), Click Drag hotkey mode and this code in Command tab:

tool = C.workspace.tools.from_space_view3d_mode(C.mode); bpy.ops.view3d.select_lasso('INVOKE_DEFAULT', True) if tool and tool.idname == "builtin.select_lasso" else bpy.ops.view3d.select_box('INVOKE_DEFAULT', True, wait_for_input=False)

🔗 View on Blender Artists