Blender Git Commit Log

Git Commits -> Revision e6e4c7e

Revision e6e4c7e by Brecht Van Lommel (master)
August 5, 2011, 20:45 (GMT)
KEYMAP REFACTORING

Diff Keymaps

User edited keymaps now no longer override the builtin keymaps entirely, but
rather save only the difference and reapply those changes. This means they can
stay better in sync when the builtin keymaps change. The diff/patch algorithm
is not perfect, but better for the common case where only a few items are changed
rather than entire keymaps The main weakness is that if a builtin keymap item
changes, user modification of that item may need to be redone in some cases.

Keymap Editor

The most noticeable change here is that there is no longer an "Edit" button for
keymaps, all are editable immediately, but a "Restore" buttons shows for keymaps
and items that have been edited. Shortcuts for addons can also be edited in the
keymap editor.

Addons

Addons now should only modify the new addon keyconfiguration, the keymap items
there will be added to the builtin ones for handling events, and not get lost
when starting new files. Example code of register/unregister:

km = wm.keyconfigs.addon.keymaps.new("3D View", space_type="VIEW_3D")
km.keymap_items.new('my.operator', 'ESC', 'PRESS')

km = wm.keyconfigs.addon.keymaps["3D View"]
km.keymap_items.remove(km.keymap_items["my.operator"])

Compatibility

The changes made are not forward compatible, i.e. if you save user preferences
with newer versions, older versions will not have key configuration changes that
were made.

Commit Details:

Full Hash: e6e4c7ef8bd53b06c879302bbfd3d6a00c6c48af
SVN Revision: 39084
Parent Commit: 7368298
Lines Changed: +1043, -499

1 Added Path:

/source/blender/windowmanager/WM_keymap.h (+104, -0) (View)

19 Modified Paths:

/release/scripts/startup/bl_ui/space_userpref_keymap.py (+19, -34) (Diff)
/source/blender/blenkernel/intern/blender.c (+25, -8) (Diff)
/source/blender/blenloader/intern/readfile.c (+33, -7) (Diff)
/source/blender/blenloader/intern/writefile.c (+18, -6) (Diff)
/source/blender/editors/interface/interface_handlers.c (+14, -11) (Diff)
/source/blender/editors/interface/resources.c (+1, -1) (Diff)
/source/blender/makesdna/DNA_userdef_types.h (+2, -1) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+20, -4) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+0, -6) (Diff)
/source/blender/makesrna/intern/rna_wm.c (+45, -202) (Diff)
/source/blender/makesrna/intern/rna_wm_api.c (+178, -5) (Diff)
/source/blender/windowmanager/intern/wm.c (+8, -2) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+6, -0) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+12, -1) (Diff)
/source/blender/windowmanager/intern/wm_keymap.c (+550, -168) (Diff)
/source/blender/windowmanager/WM_api.h (+2, -42) (Diff)
/source/blenderplayer/bad_level_call_stubs/stubs.c (+2, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021