Radio Buttons Usage?

   13918   6   5
User Avatar
Member
9241 posts
Joined: July 2007
Offline
i have made an interface from Radio Button type folders and I want to use it in Switch SOP to switch between the inputs.
How can i access the information about active radio button by expression?
Or is there some other way of using Radio Buttons?
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
696 posts
Joined: March 2006
Offline
I'm actually curious about this too.
Stephen Tucker
VFXTD
User Avatar
Member
1925 posts
Joined: Nov. 2006
Offline
Like this?

The folder set is named “folders”. To access it with an expression you need to access the first element in the set, so ch(“../folders1”).

This method works for any type of folders, not just Radio buttons.

Attachments:
drive_switch_by_folders.hipnc (41.7 KB)

Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
284 posts
Joined: Dec. 2015
Offline
Graham,
I've tried your solution on a Digital Asset but it does not seem to recognize the folder name. No matter what I do Houdini transform the name of the folder adding a number when placing the asset onto the scene, and I am pretty sure the name is original.
https://www.imdb.com/name/nm8408875/ [www.imdb.com]
User Avatar
Member
43 posts
Joined: Feb. 2018
Offline
Necro thread... the answer is: you need to set the channel reference to the name of the second folder.

Folder Name

folders,folders_1,folders_2 ......

Accessing to the flag

ch("../folders1")

I don't know why.....this is not in the docs.
User Avatar
Member
15 posts
Joined: Nov. 2022
Offline
Resurrecting the necro thread in AD 2025 to say "lol, wtf"?

Works like a charm, but how did you even figure that out? Both selecting the second folder, and removing the underscore. Must have been a lot of silly trial and error.

Appreciate you suffering on all our behalf.
User Avatar
Member
59 posts
Joined: April 2016
Offline
ubietyworld
Resurrecting the necro thread in AD 2025 to say "lol, wtf"?

Works like a charm, but how did you even figure that out? Both selecting the second folder, and removing the underscore. Must have been a lot of silly trial and error.

Appreciate you suffering on all our behalf.

We can get all parameters of the node (and hda) and parameter's name respectfully by running this python code:

node_parms = hou.node("node_path").parms()
for p in node_parms:
    print(p.name())

Just use parameter's name in expression.
Edited by vicvvsh - July 19, 2025 01:46:42
  • Quick Links