Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-08 07:59:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-09 03:33:06 +0300
commit3064da1200a97e4fba08be33dd271b09d65a2fde (patch)
treedc040c83de9ec8a828c9733e04dbb398cd174465 /source/blender/editors/interface/interface_eyedropper.c
parentb43ce7908fbb4be7ed2d230579c836aa7045d2c7 (diff)
Keymap: move builtin keymaps from C to Python
This should be purely an implementation change, for end users there should be no functional difference. The entire key configuration is in one file with ~5000 lines of code. Mostly avoiding code duplication and preserve comments and utility functions from the C code. It's a bit long but for searching and editing it's also convenient to have it all in one file. Notes: - Actual keymap is shared by blender / blender_legacy and stored in `keymap_data/blender_default.py` This only generates JSON-like data to be passed into `keyconfig_import_from_data`, allowing other presets to load and manipulate the default keymap. - Each preset defines 'keyconfig_data' which can be shared between presets. - Some of the utility functions for generating keymap items still need to be ported over to Python. - Some keymap items can be made into loops (marked as TODO). See: D3907
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper.c')
-rw-r--r--source/blender/editors/interface/interface_eyedropper.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c
index 424019995ad..3a799c6e7db 100644
--- a/source/blender/editors/interface/interface_eyedropper.c
+++ b/source/blender/editors/interface/interface_eyedropper.c
@@ -70,15 +70,6 @@ wmKeyMap *eyedropper_modal_keymap(wmKeyConfig *keyconf)
keymap = WM_modalkeymap_add(keyconf, "Eyedropper Modal Map", modal_items);
- /* items for modal map */
- WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, EYE_MODAL_CANCEL);
- WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_PRESS, KM_ANY, 0, EYE_MODAL_CANCEL);
- WM_modalkeymap_add_item(keymap, RETKEY, KM_RELEASE, KM_ANY, 0, EYE_MODAL_SAMPLE_CONFIRM);
- WM_modalkeymap_add_item(keymap, PADENTER, KM_RELEASE, KM_ANY, 0, EYE_MODAL_SAMPLE_CONFIRM);
- WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, EYE_MODAL_SAMPLE_CONFIRM);
- WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, EYE_MODAL_SAMPLE_BEGIN);
- WM_modalkeymap_add_item(keymap, SPACEKEY, KM_RELEASE, KM_ANY, 0, EYE_MODAL_SAMPLE_RESET);
-
/* assign to operators */
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_colorband");
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_color");
@@ -106,15 +97,6 @@ wmKeyMap *eyedropper_colorband_modal_keymap(wmKeyConfig *keyconf)
keymap = WM_modalkeymap_add(keyconf, "Eyedropper ColorBand PointSampling Map", modal_items_point);
- /* items for modal map */
- WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, EYE_MODAL_CANCEL);
- WM_modalkeymap_add_item(keymap, BACKSPACEKEY, KM_PRESS, KM_ANY, 0, EYE_MODAL_POINT_REMOVE_LAST);
- WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_PRESS, KM_ANY, 0, EYE_MODAL_POINT_CONFIRM);
- WM_modalkeymap_add_item(keymap, RETKEY, KM_RELEASE, KM_ANY, 0, EYE_MODAL_POINT_CONFIRM);
- WM_modalkeymap_add_item(keymap, PADENTER, KM_RELEASE, KM_ANY, 0, EYE_MODAL_POINT_CONFIRM);
- WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, EYE_MODAL_POINT_SAMPLE);
- WM_modalkeymap_add_item(keymap, SPACEKEY, KM_RELEASE, KM_ANY, 0, EYE_MODAL_POINT_RESET);
-
/* assign to operators */
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_colorband_point");