From 75bb99fa40dd09e4ae0e92cca9398b929f855a2c Mon Sep 17 00:00:00 2001 From: Leon Schittek Date: Mon, 28 Feb 2022 15:52:00 -0500 Subject: Nodes: Improve readability of selected node links This commit improves the drawing of selected node links: - Highlight the entire link to make it easier to spot where the link is going/coming from. - Always draw selected links on top, so they are always clearly visible. - Don't fade selected node links when the sockets they are connected to are out out view. - Dragged node links still get a partial highlight when they are only attached to one socket. Differential Revision: https://developer.blender.org/D11930 --- source/blender/editors/space_node/node_intern.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_node/node_intern.hh') diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh index 592db3f7877..6b5beb6c0d6 100644 --- a/source/blender/editors/space_node/node_intern.hh +++ b/source/blender/editors/space_node/node_intern.hh @@ -196,7 +196,8 @@ void nodelink_batch_end(SpaceNode &snode); void node_draw_link(const bContext &C, const View2D &v2d, const SpaceNode &snode, - const bNodeLink &link); + const bNodeLink &link, + bool selected); /** * Don't do shadows if th_col3 is -1. */ @@ -206,7 +207,8 @@ void node_draw_link_bezier(const bContext &C, const bNodeLink &link, int th_col1, int th_col2, - int th_col3); + int th_col3, + bool selected); /** If v2d not nullptr, it clips and returns 0 if not visible. */ bool node_link_bezier_points(const View2D *v2d, const SpaceNode *snode, -- cgit v1.2.3