Page MenuHome

UI: Use socket type info color to draw links
ClosedPublic

Authored by Omar Emara (OmarSquircleArt) on Oct 30 2021, 12:42 PM.

Details

Summary

Currently, colored links overlay only supports standard sockets defined
by Blender. Some add-ons like Animation Nodes defines custom sockets for
everything and hence doesn't get colored sockets.

This patch uses the draw color from the socket type info to draw links
in order to support custom sockets.

Diff Detail

Repository
rB Blender
Branch
custom-socket-overlay-draw-color (branched from master)
Build Status
Buildable 18334
Build 18334: arc lint + arc unit

Event Timeline

Omar Emara (OmarSquircleArt) requested review of this revision.Oct 30 2021, 12:42 PM
source/blender/editors/space_node/drawnode.cc
4319

Maybe it makes a little more sense to have the const cast in one place: node_socket_color_get. Eventually I'd hope the function in the type info could get a const context argument.

Thanks for the patch, this makes sense. Just one comment inline.

  • Const context in node_socket_color_get

This is aimed at 3.0 I assume? Don't forget to commit it to the release branch first and then merge it into master.

This revision is now accepted and ready to land.Nov 2 2021, 3:05 PM