diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-06 16:26:10 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-06 22:05:20 +0300 |
commit | 9ecbd67dfb672cd13f021c82d83aeb7ae8a8cf10 (patch) | |
tree | 9edad541160077d63cd77fe9c0210d29bebad6f3 /source/blender/windowmanager/WM_api.h | |
parent | b0b24b77ffc3e34b3aef24ff658826a8aeca7782 (diff) |
Python API: implement an Operator callback for dynamic description.
Blender UI Layout API allows supplying parameters to operators via
button definitions. If an operator behavior strongly depends on its
parameters, it may be difficult to write a tooltip that covers all
of its operation modes. Thus it is useful to provide a way for the
operator to produce different descriptions based on the input info.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D5709
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index c7b18adf9b1..b933448d0bd 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -547,6 +547,9 @@ struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType * const char *idname); const char *WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties); +char *WM_operatortype_description(struct bContext *C, + struct wmOperatorType *ot, + struct PointerRNA *properties); /* wm_uilist_type.c */ void WM_uilisttype_init(void); |