diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-09 06:15:57 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-11 14:10:05 +0300 |
commit | cda33345865a2705e0cbe24448865b2bdfc7ead6 (patch) | |
tree | 5d746dbd63154d768c6e32ba8dd9d89c35844776 /source/blender/editors/animation/anim_intern.h | |
parent | b2143da253edb7609bd7bb202e5b1d8fc5d99973 (diff) |
Fix setting key shortcuts for insert keyframe menu items
It was not possible to assign a shortcut to menu items in the insert
key-frame menu going back to version 2.7x. Doing so would replace the
current key that opens the insert keyframe menu (I-key by default),
instead of binding a key to insert a key-frame for the keying-set
referenced by the menu item.
Now each menu item can be bound to a key or added to the "Quick
Favorites" menu, directly inserting a key-frame for the corresponding
keying-set.
Note that users must use the operator `anim.keyframe_insert_by_name`
when setting up key-shortcuts as `anim.keyframe_insert` is only intended
to launch the menu.
Keymap Editor:
When editing these key-map items in the key-map editor, the keying-set
identifier must be used. At the moment the key-map editor doesn't
support showing a drop-down list. The identifiers can be used from the
tool-tip or the info editor.
{F12994924}
Details:
Use `ANIM_OT_keyframe_insert_by_name` instead of
`ANIM_OT_keyframe_insert_menu` for the insert keyframe popup menu to
resolve the following issues binding keys to keying sets:
- The index of the keying set isn't stable (adding/removing keying sets
may change it).
- Binding a key to items in the popup menu triggers a popup instead of
inserting a key using the keying set from the menu item.
While support for using the current operator could be improved, it will
still only work for built-in keying sets, so I'd prefer to use an
operator that is intended for key-bindings.
Besides supporting binding keys to menu items there are no functional
changes.
Reviewed By: sybren
Ref D14289
Diffstat (limited to 'source/blender/editors/animation/anim_intern.h')
0 files changed, 0 insertions, 0 deletions