← All ideas
  • Published 15 Dec 2023

A generic way to check if a socket is or isn't connected on the outside of the node group

Sometimes I want to make the node group do something different if nothing is connected to one of its sockets. An existing example is that some shader nodes will automatically use the UV Map if nothing is connected to their Vector sockets.

There are ways of doing this for some socket types (count the domain size for geometry, use attribute statistics node to see if all fields are the same), but it's really clunky, not failsafe, you'd have to make a special node for every socket type, and I'm not sure if there's even a way to check every socket type.

So, I'd be great if there was a "Is Socket Connected" node: socket_connected.jpg

I'm not sure how it would work if the node group was being used as a modifier. Probably return False, since you can't really plug stuff into a modifier.

100%

Development Status: Open

Upvote 3 Downvote 0
tolkfan
15 Dec 2023

2 Comments

ktdfly

Or at least providing a way to set a default connection input, which would be helpful for a normal or tangent inputs.

maxime1

Hi!

I think this is a great idea and I thought about this before since I love to make tools with node groups as well.

As long as this feature is not implemented, you can still do something do something similar that will work the same way. You just have a default thing going on, and a boolean checkbox that says if you want custom data, and below the custom data. I'm sending you an imgur link to an example of my own nodes how I do it. It's a little more work for the user but it's still easy and understandable

imgur.com/a/tC0uRjU