diff options
author | Leon Schittek <lone_noel> | 2022-02-28 23:52:00 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-02-28 23:52:00 +0300 |
commit | 75bb99fa40dd09e4ae0e92cca9398b929f855a2c (patch) | |
tree | ebbb8fd315e9b9e6e7d94cfd2b64fb49dd1c0a31 /source/blender/editors/space_node/node_intern.hh | |
parent | eeb0279e890e7b021e0ac9dd48d2bcf6bef8300b (diff) |
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
Diffstat (limited to 'source/blender/editors/space_node/node_intern.hh')
-rw-r--r-- | source/blender/editors/space_node/node_intern.hh | 6 |
1 files changed, 4 insertions, 2 deletions
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, |