Group Node Input Accessing (expression)??

   2455   2   1
User Avatar
Member
31 posts
Joined: Dec. 2011
Offline
Hello,

i have set up a network where i have several group nodes which all end at a switch node.
I was wondering how can i check with an expression in Hscript wheter each one of my group nodes has an input or not.?

it should be smth like ex. if(group1/“smth”)==1,1,0)

Kinds Regards
Yannis
User Avatar
Member
512 posts
Joined: July 2009
Offline
you can check if there is an input by using the opninput() expression.
something like
if(opninput(“../group1”)>0, 1, 0),
alternatively you could use python and do something like this:

node = hou.node('/obj/geo1/group1")
if not node.inputs() == None:
print “hello”


Or you could try to see if there is incoming geometry by using the npoints() or nprims() expressions and do something like this:
if(nprims(“/obj/geo1/sopnode”) > 0, 1, 0)

cheers,

Manu
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
31 posts
Joined: Dec. 2011
Offline
Thnx for the quick reply!

that is exactly what i was looking for!

Really thnx for the quick reply as well

Regards
Yannis
  • Quick Links