I’m currently trying to make an operator that adds new selection methods to the node editor.
To do this, I want to bind my operator to click dragging the left mouse button with:
km = kc.keymaps.new(name='Node Editor', space_type='NODE_EDITOR') kmi = km.keymap_items.new( "node.my_selection_operator", key_modifier="EVT_TWEAK_L", type='LEFTMOUSE', value='PRESS', )
However, when I do this, the operator is overridden by the built-in selection tools (lasso select, box select etc.), and so is never called.
Annoyingly, this only seems to happen when binding actions to this specific key, and it works perfectly well when I bind it to another key that is already used (G for example).
Do tools present in the sidebar get special treatment or something?
Is there a way to give my custom keymap item priority over the built-in tools one?