Fix #112233: Panel collapsed state should not hide socket links #112326
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#112326
Loading…
Reference in New Issue
No description provided.
Delete Branch "LukasTonne/blender:fix-collapsed-panel-link-drawing"
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?
#112019 included open/closed state of the parent panel in socket
visibility calculation. This prevents dragging links, but also disables
other features that should still work, such as drawing links.
A narrower condition is needed for icon visibility vs. general socket
visibility. The cases which use the new
is_icon_visible
condition:node_find_indicated_socket
, used by a wide range of mouse clickoperators, including the link-drag operator that was cause for
#112019.
Cases using the original
is_visible
(true even if parent panel iscollapsed):
nodeLinkIsHidden
draws links only when at least one socket isvisible.
node_update_basis
, sockets still added to layout even if icon isn'trendered.
node_update_hidden
, panels are ignored for "hidden" nodes, allsockets are rendered.
NODE_OT_link_make
operator for finding "best" sockets to connect.node_link_viewer
finding sockets to connect to a viewer node.get_main_socket
used for insert-on-links (find sockets to spliceinto) and some shader previews
node_gather_link_searches
, suggestions for adding a new node at theend of a link.
is_icon_visible()
makes sense to me now, butis_visible
returning true when the socket is inside a collapsed panel doesn't seem right. Maybe there's a better name for that?Why are the sockets added to the layout when they're inside a collapsed panel?
They still have a location in the 2D view, the point where links go to. All sockets get put in the same place and nothing is rendered, but they are not technically "invisible".
The
is_visible
flag would be more accurately described as "exists in 2d view", as opposed tounavailable
orhidden
sockets which have no meaningful location at all. A "visible" socket does not necessarily have a rendered icon. Can't think of a name that is both accurate enough and intuitive enough ...If we want to rename it, these are the options that make sense to me:
is_icon_visible
tois_drawn
oris_rendered
("The socket has a visible icon and can be interacted with")is_visible
could remain as-is, or maybe renamed tois_available
orexists
("The socket is has a valid location and may be connected").I just find
is_visible
pretty confusing when the socket is in a collapsed panel.is_available
is already taken, but that would be a nice alternative to what's currentlyis_visible
. Maybe that could be renamed to something else.@JacquesLucke any opinion on naming here?
@ -190,6 +190,7 @@ typedef struct bNodeSocket {
bool is_available() const;
bool is_panel_collapsed() const;
bool is_visible() const;
bool is_icon_visible() const;
I think this needs some comment. Took me a while to understand what
icon
refers to here.Yeah that's what our discussion was about. Hans wants to rename the
is_visible
but it's not clear what a better name would be (meaning "The socket is has a valid location and may be connected" but there may not be any visible parts). Likewiseis_icon_visible
means "The socket has a visible icon and can be interacted with".I'm happy to rename things but i don't know what to rename it to.
Maybe something like
has_interactive_icon
. Don't have a better idea right now.ok can we agree on keeping
is_visible
and renamingis_icon_visible
tohas_interactive_icon
? I want to wrap this up.My point is that the
is_visible
doesn't make sense anymore when the socket can be in a closed panel, and it makes more sense to rename it to prevent this sort of bug from happening again. What aboutis_visible
andis_visible_panel_closed
?Well,
is_visible_panel_closed
is also not quite accurate: The function just does not care if the panel is closed or not, while theis_visible
would strictly require!this->is_panel_collapsed()
.is_visible_or_panel_closed
could work. Not great but i'm willing to accept it in exchange for a green tick mark.EDIT: Oh and i'm going to name it
is_visible_or_panel_collapsed
for consistency with the other methods.