Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-02 05:54:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-02 06:01:04 +0300
commit89ed6b12936bc2a89b18cf6dbd7b86e0fbc760d3 (patch)
tree40721eeba62010ee81d86df55fed5fb236d58364 /source/blender/windowmanager/WM_api.h
parentddea2f234f0a5f00ffcc35bb6ee1a1ace6c26d8e (diff)
UI: simplify tool-tip logic for operators
- Use WM_operatortype_description to get the operator description. - Pass properties to WM_operatortype_name, so the operator name callback is used. - Add UI_but_operatortype_get_from_enum_menu function to access the operator from enum menus. - Change WM_operatortype_description to return NULL when there is no description, use WM_operatortype_description_or_name when either can be used.
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 07746af4b60..c57fe6d4ba1 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -578,6 +578,9 @@ const char *WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *p
char *WM_operatortype_description(struct bContext *C,
struct wmOperatorType *ot,
struct PointerRNA *properties);
+char *WM_operatortype_description_or_name(struct bContext *C,
+ struct wmOperatorType *ot,
+ struct PointerRNA *properties);
/* wm_operator_utils.c */
void WM_operator_type_modal_from_exec_for_object_edit_coords(struct wmOperatorType *ot);