Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_keymap.c
| Show First 20 Lines • Show All 1,289 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| int WM_modalkeymap_operator_items_to_string(wmOperatorType *ot, | int WM_modalkeymap_operator_items_to_string(wmOperatorType *ot, | ||||
| const int propvalue, | const int propvalue, | ||||
| const bool compact, | const bool compact, | ||||
| char *result, | char *result, | ||||
| const int result_len) | const int result_len) | ||||
| { | { | ||||
| return WM_modalkeymap_items_to_string(ot->modalkeymap, propvalue, compact, result, result_len); | wmWindowManager *wm = G_MAIN->wm.first; | ||||
| wmKeyMap *keymap = WM_keymap_active(wm, ot->modalkeymap); | |||||
| return WM_modalkeymap_items_to_string(keymap, propvalue, compact, result, result_len); | |||||
Severin: I'd much prefer if we reduced the reliance on `bContext`, especially in such specific functions. | |||||
| } | } | ||||
| char *WM_modalkeymap_operator_items_to_string_buf(wmOperatorType *ot, | char *WM_modalkeymap_operator_items_to_string_buf(wmOperatorType *ot, | ||||
| const int propvalue, | const int propvalue, | ||||
| const bool compact, | const bool compact, | ||||
| const int max_len, | const int max_len, | ||||
| int *r_available_len, | int *r_available_len, | ||||
| char **r_result) | char **r_result) | ||||
| ▲ Show 20 Lines • Show All 758 Lines • Show Last 20 Lines | |||||
I'd much prefer if we reduced the reliance on bContext, especially in such specific functions. So better to just pass wmWindowManager as parameter.