How to create a switch Node that recognizes if a texture is connected to the node input? I'm trying to create a little trick, which recognizes if a texture type node has a texture inside it, so if yes, like in this example, it should set the MixRGB value to 1, I'm using a math node set to &quot;Greater Than &quot;, but obviously, this interacts on the parts where the pixels have a value higher than&quot; 0 &quot;but on the others it doesn't interact and the color stays on red. Tracing the Blender logo I'm using as a test.
Is there a way to &quot;Smooth&quot; those values, and make everything set to RGB &quot;Green&quot; if a map is inserted into the node and has at least one pixel with a value greater than 0?
In short:
I would like solid color Red if no texture is inserted in the node, and all green if a texture inserted in the node

Edit:
Something was suggested to me in a previous answer. But the problem is that in Blender, an empty Texture Node fires RGB values: (0,0,0) in Eevee, and (1,0,1) in Cycles. So, use solution would be with regard to RGB values only (Leaving aside the Alpha factor for now)
Feedback like this:
Here are three ways to do it:

Python Nodes API: with Python nodes like mentioned before, you can create a smart/dynamic node, that can change values depending on Python properties, like if an image is inserted or not

if you don't want to use PyNodes, you can use drivers, here's a simple driver that does what you need (change &quot;Image Texture&quot; in drivers panel to the name of your Image Texture Node):

if you plan to have such functionality inside a node group, you could set a chosen default value for a socket (a negative value would work in this case), then if nothing is connected to the socket, it would have the default value, which you compare and detect, if something is then connected to the socket, that would change its value, now the compare would return 0, it all works out, because Image Texture Node won't produce a negative value.