[Bf-taskforce25] Saving keymaps

Domino Marama domino at dominodesigns.info
Thu Sep 17 22:06:15 CEST 2009


On Thu, 2009-09-17 at 21:17 +0200, Brecht Van Lommel wrote:
> The advantage of this is that it requires no manual syncing. A
> disadvantage is that it doesn't cope well with a change in default
> Blender shortcut keys. Say the user has changed G translate to M. Then
> the default in Blender changes from G to ctrl+G. The result is that
> now both ctrl+G and M do a translation. So then you can't as easily
> take your keymap and apply it, because it depends more on the Blender
> version.

> Does anybody have ideas about how to do better, or about other apps
> handling this in a good/bad way? It's kind of a general issue, suppose
> you wanted to modify a menu, does that completely override the
> existing one then, or do we try to be clever about syncing, accepting
> it sometimes gives results you don't want?

So is it for example, the E for edge tools the type of menu you mean?

If so then I'd prefer not to have a menu hotkey as such.. Just allow
none unique key mappings and automatically generate a menu from all
items assigned to the key.

Then it'd just need remove(key, option) and add(key, option).. remove to
remove a default, and add to add one.

In your example there would be remove( G_KEY, translate) and add( M_KEY,
translate)

The update would make the remove obsolete as no default key, function
pairing would match (G_KEY, translate). This could be removed when
settings are next saved.

If I'd also got something else on CTRL-G, then I'd now start getting a
menu with "Translate" and my other option. I could manually resolve this
by adding a remove( CTRL_G_KEY, translate) entry or even remove( M_KEY,
translate) if I preferred the new default.

So if I use a hotkey with one assignment, just do it, otherwise generate
the options menu. Could even have a index / priority per assignment so
the popup menus be ordered for number hotkeys.



More information about the Bf-taskforce25 mailing list