HDA and expression issue

   2063   3   1
User Avatar
Member
383 posts
Joined:
Offline
Hello,

I am making an asset with two inputs.
Inside this asset, I have a switch
I want to check if something is connected to the 2nd input and then change the switch value ( from 0 to 1).

I tested this python expression :


node = hou.node('../')
nConn = node.inputConnections()

if len(nConn) == 1 :
return 0

return 1


if the code seems to work I have now an issue because when the second input is non_connected, my asset return an error “ not enough source specified”

How can I make it work ?

Thanks.
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
7733 posts
Joined: July 2005
Online
Make your asset have a lower minimum number of inputs.
User Avatar
Member
383 posts
Joined:
Offline
thanks
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
131 posts
Joined: June 2016
Offline
edward
Make your asset have a lower minimum number of inputs.
That helped me a lot. After few hours of research I found this answer!I was so dumb that I dint see that option which is available on the first tab itself. Thank you so much @Edward.
Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
  • Quick Links