Page MenuHome

Followup to D214: Avoid addons loosing all there custom keymaps each time you hit F8.
AbandonedPublic

Authored by Bastien Montagne (mont29) on Jan 21 2014, 5:39 PM.

Details

Summary

Simply update all keymaps' RNA pointers when registering a new addon.

Depends on: D214

Diff Detail

Branch
f8_keep_pyops_keymaps

Event Timeline

*sigh* Why do we have the whole patch here? I have rebased the branch --onto the other one… :/

Anyway, this is to be checked after D214, will update it then I guess.

http://www.graphicall.org/ftp/ideasman42/keymap_example_fix.diff

Attached a WIP example to how I think this could be fixed (discussed with mont29 online).

It sets a flag when an operator is removed which validates keymap items after.

Whats missing from the patch...

  • 1, 2 flags should be constants.
  • WM_operatortype_remove has no access to WM_KEYMAP_UPDATE, should be an extern or so.
  • need to double check {&U.user_keymaps, &wm->userconf->keymaps, &wm->defaultconf->keymaps, &wm->addonconf->keymaps, NULL} is a comprehensive list of keymap items.