Is Connected VOP

   378   6   1
User Avatar
Member
257 posts
Joined: 7月 2006
オフライン
I'm trying to use the Is Connected VOP for the first time.

I'm in a subnet ( ultimately to become an HDA ), and I want it to output one color ( red ) if an input is not connected, otherwise output the connected input ( green ). The way I have it set up, it's outputting the expected color when the input is connected, but not when not connected ( it's outputting black instead of red ). So, is this not the way it's meant to be used?

Please see the attached hip file.
Edited by A-OC - 2025年8月28日 01:53:38

Attachments:
im.png (358.4 KB)
is_conn.hip (688.6 KB)

User Avatar
Member
9249 posts
Joined: 7月 2007
オフライン
while Is Connected VOP doesnt seem to work, you don't really need it

- just create your HDA and then set default value to your promoted custom_input parm and if you don't want to see it in UI make it invisible

- or alternatively use Parameter VOP set to Subnet Input using the same idea

Attachments:
is_conn_mod.hipnc (691.6 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
257 posts
Joined: 7月 2006
オフライン
Thank you, the problem is that my actual need is to use "Position" instead of color, that was just the simplest scene possible, I guess it was too simple then.

So, what I really need is to output the connected position ( when it is connected ), otherwise output uvs ( from UV Position node )
User Avatar
Member
9249 posts
Joined: 7月 2007
オフライン
so it looks like Is COnnected only woks with Subnet Inputs node, which seems to be hidden
not with the default Subnet Input Connector node, and it's probably a bug

have a look at the attached example using Subnet Inputs

Attachments:
is_conn_mod2.hipnc (686.0 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
257 posts
Joined: 7月 2006
オフライン
Interesting. I'm trying to recreate it but it's not working for me: I connect P to null_1, then that to null_2, then make a subnet out of null_1, inside there is the Subnet Inputs node, then build the logic there. When done, if I disconnect P outside I get an error, so I guess it only works with hda's. So I create an hda, then test again, but when I disconnect P I get black as output again. What did I do differently?
User Avatar
Member
9249 posts
Joined: 7月 2007
オフライン
A-OC
What did I do differently?
hard to tell, but try plugging your result into next output, not the same name as our input, I'm also getting black if I use the same name
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
257 posts
Joined: 7月 2006
オフライン
Amazing, that's it. Thanks a lot once again.
  • Quick Links