UI: Enable tooltips with description for shaders #119705
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119705
Loading…
Reference in New Issue
No description provided.
Delete Branch "Bartosz-Kosiorek/blender:tooltip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Generic tooltips for all shaders are defined in file:
https://projects.blender.org/blender/blender/src/branch/main//source/blender/nodes/NOD_static_types.h#L22
It is displayed during Adding new Shader.
Unfortunately when we are opening existing project, is it hard to analyse (for beginners), as there is no tooltips with describtion of the Shader.
This commit adds tooltips with shader description display for a shaders.
UI: Enable tooltips for shadersto WIP: UI: Enable tooltips for shadersdfcd8a0d2a
to54e6a13e6d
I suggest to look at how sockets implement tooltips, see
node_socket_add_tooltip_in_node_editor
callinguiLayoutSetTooltipFunc
54e6a13e6d
tob90978166b
WIP: UI: Enable tooltips for shadersto WIP: UI: Enable tooltips with description for shadersWIP: UI: Enable tooltips with description for shadersto UI: Enable tooltips with description for shadersI was able to display tooltips by using
UI_BTYPE_TAB
instead ofUI_BTYPE_LABEL
.It is working as I intended (see screenshot), including resizing and shade dragging.
Unfortunately the text is aligned at center.
The tooltips are created in function:
UI_tooltip_create_from_button_or_extra_icon
Ok, but using the same mechanism as sockets is probably still the correct solution.
Unfortunately for Shader's socket, the tips are only displayed if mouse is over Socket button (like
Color picker
orvariable picker
).If the Socket is without possible to customization (without button), the tip is not displayed.
See attached screenhot: The tooltip are displayed over
Fac
button. The tooltip overShader
Socket is not displayed at all.Try latest main.
b90978166b
toda43a39721
da43a39721
to70a049ac2b
I managed to implement it with
UI_BTYPE_LABEL
, and it is working perfectly fine. Thanks @brecht @mod_moderUnfortunately, not all nodes have descriptions (Composite. Texture Nodes, etc.).
In next PR-s I would like to add descriptions to such nodes, and add warning/assertion if any node have empty description. I think it will improve quality of User Interface.
70a049ac2b
tof1a3d33670