Fix #112490: Always draw socket icons in "hidden" nodes #112520

Merged
Lukas Tönne merged 5 commits from LukasTonne/blender:fix-hidden-node-sockets-in-panels into main 2023-09-19 10:47:28 +02:00

5 Commits

Author SHA1 Message Date
Lukas Tönne 726c7857d8 Comments for the new socket visibility functions. 2023-09-19 10:46:08 +02:00
Lukas Tönne b7d474ec79 Cleanup: formatting. 2023-09-19 10:41:36 +02:00
Lukas Tönne f9c16e89be Merge branch 'main' into fix-hidden-node-sockets-in-panels 2023-09-19 10:38:50 +02:00
Lukas Tönne 1a41124c85 Rename `is_visible_or_panel_closed` back to just `is_visible`.
The other `is_visible` variant is now integrated in
`bNode::is_socket_drawn`.
2023-09-18 13:43:15 +02:00
Lukas Tönne 775de616cf Fix #112490: Always draw socket icons in "hidden" nodes.
In #112326 the socket visibility functions were updated to take the
open/closed state of panels into account for visibility of the socket
icon. However, in "hidden" (collapsed) nodes the panels should be
ignored entirely, drawing all sockets on the root level. This requires
looking at the node flags to determine socket icon visibility, so a
simple method of `bNodeSocket` is not sufficient.

This patch moves the more complex visibility queries for sockets into
`bNode`, where both node and socket flags can be accessed. These should
be used for actual visibility rather than the plain flag accessors on
`bNodeSocket`.
2023-09-18 12:51:57 +02:00