Disable Digital Asset Input

   2802   3   0
User Avatar
Member
2129 posts
Joined: Sept. 2015
Offline
Anyone one know how to disable a digital asset input so that it doesn't error if nothing is connected.

Within the asset network I can make a switch and control using either the input or a default node/s.

But when switching away from the input the asset errors out because there is nothing connected to it.

I've thought about trying a ‘disable when’ approach, but could not find any parameter that is directly linked to the input.

If in its pre-asset stage, there are the label parameters of the subnet, but the disable when approach fails when apply/accept is used. (the expression disappears, not surprisingly though since it's only a label).

I could make a different type within the asset and just switch between an input and no input version. Or just always connect a Null node to the input in cases that I don't use that input.

But would be nice to know how to have the functionality of both being connected and not in the same asset type.
User Avatar
Member
8832 posts
Joined: July 2007
Offline
in the Type Properties of your asset in Basic tab you can specify
Minimum Inputs - number of inputs that have to be connected for asset to work
Maximum Inputs - max number of inputs that can be connected

so if minimum inputs is 0, then node will not error out when nothing is connected
if it is 1, then it needs at least first input connected
2, first 2 inputs, etc.

so just decrease it until you satisfy all your use cases, and then just do your internal logic based on what's actually connected or whatever you need
Edited by tamte - June 29, 2019 11:49:30
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2129 posts
Joined: Sept. 2015
Offline
Thank you very much Tamte for the reminder.(I had done this in the past, but my memory is not the best)
User Avatar
Member
146 posts
Joined: June 2016
Offline
Hello Masters of the Houdini forums.

I used the same technique which Thomas mentioned to get rid of the error. but however, there are few vanilla nodes in Houdini which has this error by default for example the Timeshift SOP



When I use such nodes in my HDA as shown in the images below then the HDA also inherits the same error since it is connected to the Sub-Network Input #




To Avoid this i have added a "null" between the input and the "timeshift".





Sharing this for someone who might wonder how to solve this.




Thanks!
Edited by Mohanpugaz - June 3, 2023 06:27:09

Attachments:
Screenshot 2023-06-03 154508.png (9.1 KB)
Screenshot 2023-06-03 154905.png (10.7 KB)
Screenshot 2023-06-03 154955.png (55.6 KB)
Screenshot 2023-06-03 155646.png (34.8 KB)

Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
  • Quick Links