Asset: toggle switch by clicking on tabs?

   4759   7   1
User Avatar
Member
1075 posts
Joined: 4月 2017
Offline
Hi, I poste this in “Houdini Indie and Apprentice” but got no replies so far:


Lets say I have a sphere, box and platonic connected to a switch. I would like the parameters of the asset to contain folders (radio button) for each geo. If I click on “box”, it should change the switch the “Select Input” to 1, etc.

How can I link the switch to the folder in the parameters?

-Olivier

Attachments:
asset_switch.jpg (144.3 KB)

User Avatar
スタッフ
3462 posts
Joined: 7月 2005
Offline
this might help

https://www.sidefx.com/forum/topic/13139/ [www.sidefx.com]
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
1075 posts
Joined: 4月 2017
Offline
Thanks for the link but when I try the same thing, it doesn't work. I opened his file and I still can't figure out what I'm doing differently…

Attachments:
folder_radio_path.JPG (83.6 KB)

User Avatar
スタッフ
3462 posts
Joined: 7月 2005
Offline
name you folders the same way:
folder
folder1
folder2
etc
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
1075 posts
Joined: 4月 2017
Offline
I could only change the name of the first folder. all other folders had their name greyed out until I changed them all to tabs. After that I changed the names to :

folder
folder1
folder2
folder3

…and changed them back to radio buttons. Now the names are ok. I also changed the Switch sop path to ch(“../folder”) but I still get an error:


Warning
Bad parameter reference: “../folder” in parameter /obj/wood_floor_generator/Oli_wood_floor_generator/switch_pattern1/input.

By the way, thanks for helping out!

-Olivier

Attachments:
greyed_name.JPG (137.1 KB)

User Avatar
Member
1075 posts
Joined: 4月 2017
Offline
Ok, so I found a way to make it work. It's a bit odd how it works and I don't fully understand it.

1. in the type properties, I created all my folders.
2. I set the first one's Name to geo_type
3. I set all folders to be radio buttons
4. In the switch, I used the channel expression: ch(“../geo_type1”)

…I don't understand it works since none of the folders' names match the channel's geo_type1 . The names of my folders are:

geo_type
geo_type_1


Anyone knows why? Anyways, I found the solution here:

http://takavfx-note.tumblr.com/post/128059754537/radio-button-tab-menu-in-houdini
[takavfx-note.tumblr.com]

-Olivier
User Avatar
Member
1075 posts
Joined: 4月 2017
Offline
…now I'm trying to add another set of folers(radio buttons) for color_type but I can't make it work…
User Avatar
Member
9 posts
Joined: 3月 2016
Offline
Does the expression just work off the last iteration of the name sequence? Like if it's creation_type, creation_type1 it will look at creation_type1 as the last entry in the Switch array of inputs?
Image Not Found
Edited by JohnDraisey - 2022年7月5日 18:20:05

Attachments:
creation_type1.png (309.4 KB)

  • Quick Links