diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-08 07:59:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-09 03:33:06 +0300 |
commit | 3064da1200a97e4fba08be33dd271b09d65a2fde (patch) | |
tree | dc040c83de9ec8a828c9733e04dbb398cd174465 /source/blender/editors/include | |
parent | b43ce7908fbb4be7ed2d230579c836aa7045d2c7 (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/include')
-rw-r--r-- | source/blender/editors/include/ED_markers.h | 3 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 7 | ||||
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 2 |
3 files changed, 1 insertions, 11 deletions
diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h index a95e283f218..fa907010870 100644 --- a/source/blender/editors/include/ED_markers.h +++ b/source/blender/editors/include/ED_markers.h @@ -72,9 +72,6 @@ void ED_operatortypes_marker(void); /* called in screen_ops.c:ED_keymap_screen() */ void ED_keymap_marker(struct wmKeyConfig *keyconf); -/* called in animation editors - keymap defines */ -void ED_marker_keymap_animedit_conflictfree(struct wmKeyMap *keymap); - /* debugging only */ void debug_markers_print_list(struct ListBase *markers); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index b71e7133c58..afe037c92d1 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -108,13 +108,6 @@ bool ED_object_parent_set(struct ReportList *reports, const struct bContext *C, const int vert_par[3]); void ED_object_parent_clear(struct Object *ob, const int type); -void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); -void ED_keymap_proportional_obmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); -void ED_keymap_proportional_maskmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); -void ED_keymap_proportional_editmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, - const bool do_connected); -void ED_keymap_editmesh_elem_mode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); - void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode); void ED_object_base_activate(struct bContext *C, struct Base *base); void ED_object_base_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Object *ob); diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 3fe2e3a1436..7adc2d99879 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -48,7 +48,7 @@ struct Main; struct SnapObjectContext; struct SnapObjectParams; -void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid); +void ED_keymap_transform(struct wmKeyConfig *keyconf); void transform_operatortypes(void); /* ******************** Macros & Prototypes *********************** */ |