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
Group Node Input Accessing (expression)??
2455 2 1-
- yanioaioan
- Member
- 31 posts
- Joined: Dec. 2011
- Offline
-
- asnowcappedromance
- 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
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
-
- yanioaioan
- Member
- 31 posts
- Joined: Dec. 2011
- Offline
-
- Quick Links

