UI: Make it possible to add shortcuts to UI operators.
Function `WM_keymap_guess_opname()` skipped `UI_OT` operator types. In some cases this is detremental to workflow, see #105371. To exclude operators from getting keyboard shortcut it was suggested by Campbell to use flag `OPTYPE_INTERNAL` or make new one. Pull Request: blender/blender#105383
This commit is contained in:
@@ -183,7 +183,6 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
|
||||
* ED_OT
|
||||
* FLUID_OT
|
||||
* TEXTURE_OT
|
||||
* UI_OT
|
||||
* WORLD_OT
|
||||
*/
|
||||
|
||||
@@ -446,6 +445,10 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* User Interface */
|
||||
else if (STRPREFIX(opname, "UI_OT")) {
|
||||
km = WM_keymap_find_all(wm, "User Interface", 0, 0);
|
||||
}
|
||||
|
||||
return km;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user