HDA: "Hide When" affecte by attribute inside the HDA {[SOLVED]}

   260   5   1
User Avatar
Member
1262 posts
Joined: April 2017
Offline
Hi!

I need multiple parameters to be hidden depending on a detail integer attribute inside the HDA. How?

I usually drive visibility by channels on the HDA (top level). I've never driven visibility by whats inside the HDA...
Edited by olivierth - Oct. 21, 2026 14:22:31

Attachments:
Houdini_HDA_hide_when_attribute_inside_01.jpg (29.0 KB)

-Olivier
User Avatar
Member
9744 posts
Joined: July 2007
Offline
drive it by the invisible integer parameter on the HDA
and make that parameter's default expression read the detailattrib, like: detail("./OUT", "attrib", 0)

just be aware that making UI depend on cooking of the geometry may not always be a good idea, as it will force that geo stream to cook and slow things down, or if its uncooked and in manual mode it may just use 0, may be wrong when observed within foreach block as te UI will likely just reflect the current iteration, hiding the controls that maybe are important to tweak as other iterations may need to use them etc...
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1262 posts
Joined: April 2017
Offline
Ah.

My goal is to connect multiple assets (packed primitives with names) to my HDA and to have the list automatically fill up like in my image. What would be the best way to do so?

Attachments:
Houdini_HDA_hide_when_attribute_inside_02.jpg (31.9 KB)

-Olivier
User Avatar
Member
1262 posts
Joined: April 2017
Offline
Ah! I just tested your trick with detail("./OUT", "attrib", 0) as the default for my hidden channel. So far so good. I don't notice any problems so I think I'll stick to that method.

Thanks a lot!
-Olivier
User Avatar
Member
9744 posts
Joined: July 2007
Offline
olivierth
...My goal is to connect multiple assets (packed primitives with names) to my HDA and to have the list automatically fill up like in my image. What would be the best way to do so?

in that case definitely don't make it based on geo unless maybe if you have fixed set of assets that never changes and you just want to control the visibility

if the amount/names of named prims in the expected geo is variable, I'd do a UI with default probability slider which will be a fallback value for any named prim
and then a multiparm, where you can add specific named instances, dropdown one of the names from the current geo's unique name values (or specify a name pattern) and set it's probability, which will internally use it for named prims matching that pattern instead of the default value

you can have a button that will fill the multiparm for you based on one time cook, or just add missing, maybe have enable toggle on each so you(or the button) can just disable ones that are no longer present without losing the value

but definitely keep it decoupled from the geo, since there is nothing worse than UI trying to be too smart and update when the geo is in errored state or empty and wiping out all your values, etc
Edited by tamte - Oct. 21, 2026 14:28:25
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1262 posts
Joined: April 2017
Offline
I see. For now, I'll stick to the simple/dangerous method (*until an artist gets pissed off about it).

Thanks for explaining the more complex method in detail. I'll eventually have to use it at some point.
-Olivier
  • Quick Links