Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Schempp <fabian_schempp>2021-02-24 22:01:24 +0300
committerHans Goudey <h.goudey@me.com>2021-02-24 22:01:24 +0300
commitb54b56fcbea62b958dc48441b150aecfb04c8a00 (patch)
treec18ef6b6519c80d2cb4a68bfb01ce0b1eac56905 /source/blender/editors/space_node/drawnode.c
parent89196765ba28e3d48e45c0f9f3c69d9d0b5fb624 (diff)
UI: Make node virtual sockets more visible
This commit tweaks how virtual sockets (unconnected node group input and output sockets) are drawn to make them more recognizable. The outline is changed to a gray color, and they get a dark inner color. Differential Revision: https://developer.blender.org/D10080
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 4716f1c29ea..82a1cd818c9 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3261,6 +3261,8 @@ void ED_init_custom_node_socket_type(bNodeSocketType *stype)
stype->draw = node_socket_button_label;
}
+static const float virtual_node_socket_color[4] = {0.2, 0.2, 0.2, 1.0};
+
/* maps standard socket integer type to a color */
static const float std_node_socket_colors[][4] = {
{0.63, 0.63, 0.63, 1.0}, /* SOCK_FLOAT */
@@ -3461,8 +3463,7 @@ static void node_socket_virtual_draw_color(bContext *UNUSED(C),
PointerRNA *UNUSED(node_ptr),
float *r_color)
{
- /* alpha = 0, empty circle */
- zero_v4(r_color);
+ copy_v4_v4(r_color, virtual_node_socket_color);
}
void ED_init_node_socket_type_virtual(bNodeSocketType *stype)