Multiple Toggles (only one toggle should be ON)

   351   5   1
User Avatar
Member
1169 posts
Joined: April 2017
Offline
Hi!

I have multiple toggles and I'd like only one toggle to be active at a time. If I click on C it should uncheck A and B.

Is it done with multiple chi() (like my image) or a single one with an other "Type"?

-Olivier
Edited by olivierth - Nov. 7, 2025 10:37:50

Attachments:
Houdini_Multi_Toggles_01.jpg (65.7 KB)

User Avatar
Member
9337 posts
Joined: July 2007
Offline
while you could implement turning on/off of others using callback scripts if you really want to stick to toggles
but I'd certainly recommend using Button Strip instead

Attachments:
ts_button_strip_example.gif (71.9 KB)
ts_button_strip_example.hipnc (81.9 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1169 posts
Joined: April 2017
Offline
Super! I'll test that out, thanks!

-Olivier
User Avatar
Member
1169 posts
Joined: April 2017
Offline
...Arg! I tried to replicate your Button Strip example in another Wrangle but I just can't get it to work. I tried to replicate all settings but my buttons don't show up. The only difference I found is the "Use Menu" (under the Menu tab).

I'm I missing something?

-Olivier

Attachments:
Houdini_Button_Strip_01.jpg (174.5 KB)
Houdini_Button_Strip_02.jpg (40.9 KB)
ts_button_strip_example_Olivier.hipnc (59.4 KB)

User Avatar
Member
9337 posts
Joined: July 2007
Offline
olivierth
I tried to replicate all settings but my buttons don't show up. The only difference I found is the "Use Menu" (under the Menu tab).
yes, that's one gotcha of Button Strip, it has to have the menu enabled and then the buttons in Button Strip are the entries in the menu
and the menu type defines whether you can select only a single option (Replace) or allowed to select multiple ( Toggle )

since menu is compulsory the menu checkbox is grayed out, but there seems to be a bug that the parameter still cares whether the checkbox is enabled or not

if you create Button Strip parm directly then the menu will be enabled
however if you created parameter of any other type and then changed it to Button Strip (which is likely what happened) then the menu is likely unchecked

so just change it to Int, enable Menu and change back to Button Strip
or create Button Strip to begin with
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1169 posts
Joined: April 2017
Offline
I'm glad there's a forum for things like this. There's no way I would've found that in the help documentations!

Thanks again, tamte!
  • Quick Links