Add Object Tool: rename keymap, expose in keymap editor

Make the name follow the convention of other View3D keymaps.
This commit is contained in:
Campbell Barton 2021-01-16 11:29:53 +11:00
parent 27c142aa29
commit 8fd3ffcb31
Notes: blender-bot 2023-02-14 05:11:48 +01:00
Referenced by issue #57210, Add Object Tools Todo
3 changed files with 5 additions and 4 deletions

View File

@ -118,6 +118,7 @@ _km_hierarchy = [
('Object Non-modal', 'EMPTY', 'WINDOW', []), # mode change
('View3D Placement Modal', 'EMPTY', 'WINDOW', []),
('View3D Walk Modal', 'EMPTY', 'WINDOW', []),
('View3D Fly Modal', 'EMPTY', 'WINDOW', []),
('View3D Rotate Modal', 'EMPTY', 'WINDOW', []),

View File

@ -5087,10 +5087,10 @@ def km_transform_modal_map(_params):
return keymap
def km_view3d_interactive_add_tool_modal_map(_params):
def km_view3d_interactive_add_tool_modal(_params):
items = []
keymap = (
"View3D Placement Modal Map",
"View3D Placement Modal",
{"space_type": 'EMPTY', "region_type": 'WINDOW', "modal": True},
{"items": items},
)
@ -6997,7 +6997,7 @@ def generate_keymaps(params=None):
km_eyedropper_modal_map(params),
km_eyedropper_colorramp_pointsampling_map(params),
km_transform_modal_map(params),
km_view3d_interactive_add_tool_modal_map(params),
km_view3d_interactive_add_tool_modal(params),
km_view3d_gesture_circle(params),
km_gesture_border(params),
km_gesture_zoom_border(params),

View File

@ -1174,7 +1174,7 @@ void viewplace_modal_keymap(wmKeyConfig *keyconf)
{0, NULL, 0, NULL, NULL},
};
const char *keymap_name = "View3D Placement Modal Map";
const char *keymap_name = "View3D Placement Modal";
wmKeyMap *keymap = WM_modalkeymap_find(keyconf, keymap_name);
/* This function is called for each space-type, only needs to add map once. */