UI: support searching in menus #110855

Merged
Jacques Lucke merged 38 commits from JacquesLucke/blender:single-menu-search into main 2023-09-06 18:16:52 +02:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 840a7923b2 - Show all commits

View File

@ -1903,7 +1903,7 @@ static void WM_OT_search_operator(wmOperatorType *ot)
static void WM_OT_search_single_menu(wmOperatorType *ot)
{
ot->name = "Search Single Menu";
ot->idname = __func__;
ot->idname = "WM_OT_search_single_menu";
JacquesLucke marked this conversation as resolved Outdated

Not sure if I noted this before, but I'm unsure about using __func__ for the operator idname. This breaks BPY compatibility when renaming a function (!) and it uses an "implementation-defined format" in C++ (unlike in C). See https://stackoverflow.com/questions/4384765/whats-the-difference-between-pretty-function-function-func or https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros.

Not sure if I noted this before, but I'm unsure about using `__func__` for the operator idname. This breaks BPY compatibility when renaming a function (!) and it uses an "implementation-defined format" in C++ (unlike in C). See https://stackoverflow.com/questions/4384765/whats-the-difference-between-pretty-function-function-func or https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros.
ot->description = "Pop-up a search for a menu in current context";
ot->invoke = wm_search_menu_invoke;