0
$\begingroup$

For the project I'm working at the moment it would be very useful for me to highlight some of the links in the node editor (for links I mean edges between nodes) by changing their color with a custom one given by me. I don't want to change all links in the editor, just a subset selected by me, each of which with a different color.

I looked at bpy documentation but I have not found any kind of reference to the possibility of doing this through python script. Is there any ""hack"" that I can try ? I also noticed that link's color seems to be calculated by interpolating "from socket" and "to socket" colors, is there any way of changing "socket color" using bpy ?

Example image

Thank you in advance and sorry for any mistake (first time posting a question).

$\endgroup$
3
  • 1
    $\begingroup$ Looks like you can by accessing the bpy.types.ThemeNodeEditor attributes: wire, wire_select, and wire_inner. Looks like it takes a float 3 of colors. However I don't know if that will over ride the "data transmission" effect as that color coding is meant to convey what kind of data the noodle is carrying. This might only work on the default gray noodles. $\endgroup$
    – Jakemoyo
    Commented Aug 18, 2022 at 15:28
  • $\begingroup$ @Jakemoyo I think that this would change all the links in the editor, not just a subset of them. Sorry, I forgot to mention that I need to change only a subset of them (I'm going to edit the question). Btw thank you for the answer :) $\endgroup$ Commented Aug 18, 2022 at 16:24
  • 2
    $\begingroup$ I think the color set for typed links is hardcoded. You can change them with a custom build of Blender though. $\endgroup$
    – Gorgious
    Commented Aug 18, 2022 at 17:16

1 Answer 1

0
$\begingroup$

As mentioned by @Gorgious, you would have to modify Blender's source code and compile it to create a custom build of Blender. But maybe you could use a combination of a Frame Node (Add > Layout > Frame) and nested Reroute Nodes (Add > Layout > Reroute) and give it some color to give some importance to your noodle.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .