How do I get an icon to appear in the label of my custom python node? Note: This was an issue in 2.79, but has been fixed in 2.83.



Custom python nodes have a bl_icon property which, when set to a valid icon name, is meant to display an icon for the node.

I presumed this icon would appear next to the node label like the compositing nodes have:



However, I have not been able to get an icon to appear for my nodes, and even the template in Text Editor> Templates> Custom Nodes doesn't seem to succeed in displaying the icon it defines. 

Is there some other property that needs to be enabled to get the icon to appear or am I misunderstanding the purpose of defining a bl_icon property?
So far, the node icon only seams to appear in outliner (like datablocks).
Not very useful.

+The icon you show in the picture is preview button and it's hardcoded. not py

AFAIK you can alter, even in "real time" , the label with draw_label() and also the sockets texts. And of course, the color and size of the node. But not much more.

-

There might be an extreme workaround...

If you really need an image or something else on top of that, so much that you'd design a whole system just for that (instead of making great nodes and addons :D ), you can use OpenGl to draw something on top of the node, or header or whatever area

an example is this (note that the white rectangle could be on top of the self node! whatever the coords you need, you can work out the header area with precision)



and it's about
https://github.com/JacquesLucke/animation_nodes/tree/master/graphics