Nodes: add descriptions for why links are invalid #121976
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#121976
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "JacquesLucke/blender:invalid-links-info"
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?
Blender shows invalid links in red in the node editor. However, it's not always obvious why some links don't work, especially for beginners. This patch adds additional information for every invalid link on the node that it links to.
The following error messages are added:
Currently, there are some per tree-type special cases in the link validation code. In the future, this should be moved to tree type specific callbacks.
Overall +1, especially for the hint about node groups with the menu socket, that will probably help people.
@ -2987,0 +3016,4 @@
continue;
}
}
if (tree.type == NTREE_GEOMETRY) {
I guess I bring this up a lot, but I don't really like how these tree types and socket types are hardcoded in code that could/should be more general. For example, another way for this to work would be more closely aligned with the existing code that makes links red in the UI. Error messages could be assigned at that point and drawn on the "to" node. That's basically extending the existing generic system.
I moved the error messages closer to the code that makes the links invalid, that's a good idea. There is still some special case handling for geometry nodes going on there right now, but I think it's good enough now, better than having it in drawing code.
I'm okay with this now, thanks. I think the next step is to make a slightly more powerful version of
validate_link
that returns an optional error message for why the link isn't valid. That seems like the right way to make the behavior generic. If you don't mind, could you mention that as a TODO in the code or the commit message?This is looking good! Definitely makes these learning moments more valuable
+1 to remove
NodeLinkError
and just callstd::optional<StringRef> bNodeTreeType::validate_link(...) const
in draw code.@mod_moder The error message is generated sometimes and thus can't just be stored in a
StringRef
. Also it's not really worth optimizing this, because there aren't many link errors overall.Total number of invalid cases not so many to do not just store them strings in some static array\
Looks great overall!
The overlay should ideally be shown only once with multiple conflicts per node and the tooltip should show a de-duplicated list.
Looks good to me now!