UI: Add tooltips with node description to node titles
These were already displayed in the node add menu. But it can also be useful to see node descriptions when opening existing projects. Pull Request: https://projects.blender.org/blender/blender/pulls/119705
This commit is contained in:
committed by
Brecht Van Lommel
parent
c87e8790bb
commit
749433f20b
@@ -68,7 +68,9 @@ bool ui_but_is_interactive_ex(const uiBut *but, const bool labeledit, const bool
|
||||
if (but->type == UI_BTYPE_LABEL) {
|
||||
if (for_tooltip) {
|
||||
/* It's important labels are considered interactive for the purpose of showing tooltip. */
|
||||
if (!ui_but_drag_is_draggable(but) && but->tip_func == nullptr) {
|
||||
if (!ui_but_drag_is_draggable(but) && but->tip_func == nullptr &&
|
||||
(but->tip == nullptr || but->tip[0] == '\0'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3424,7 +3424,8 @@ static void node_draw_basis(const bContext &C,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
TIP_(node.typeinfo->ui_description));
|
||||
|
||||
if (node.flag & NODE_MUTED) {
|
||||
UI_but_flag_enable(but, UI_BUT_INACTIVE);
|
||||
}
|
||||
@@ -3661,7 +3662,7 @@ static void node_draw_hidden(const bContext &C,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
TIP_(node.typeinfo->ui_description));
|
||||
|
||||
/* Outline. */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user