First, the issue I’m having right now is more or less beside the point- but here goes: I’m trying to add a new keymap item to the addon keyconfig in the 3D View keymap. Doesn’t show up when blender loads… okay no problem this has happened before and I’ve gotten around it by using the 3D View Generic keymap (which is somehow different than 3D View Global, for reasons that don’t seem to be clear to anyone).
Nope, that doesn’t work, let me check and see if the keymap item is even in the keymap by looping through the keymap items in the terminal and spitting out all of the items. It’s there! it’s even active! Doesn’t show up in the input manager. Key event does nothing. Let me start throwing spaghetti at the wall and see what sticks for 3 hours. Oh hey, if I accidentally typo the idname its RNA name shows up in the input editor! That’s weird, but let me try renaming the idname to the typo’d version. Now it shows up in the input editor and works.
W. T. F.
Why is it this arcane? This is not my first rodeo, or even my first addon. The API here fails super hard in my opinion. Why are all addon keymaps just dumped into the same keyconfig, rather than added to their own bespoke keyconfig that could easily be enabled and disabled? Why is there no clear heirarchy to the keymaps? Why does an addon keymap handle downstream priority over the user keymap in some situations, but completely fail in others (IE: if the user has MIDDLEMOUSE, PRESS bound, my addon can’t use EVT_TWEAK_M, ANY in the same keymap)?
I spend more of my time jumping through hoops to get addon keymaps working than actually working on my addons lately.Tempted to just say F it and force the users to bind all the keys themselves so I don’t have to deal with it anymore!