I have a subnetwork which creates grids for motion graphics. In the parameter interface I want to specify the method of spacing with two toggles: by_Size and by_Copies. Only one method can be used at a time so I want to assign a value to each of these toggles to make them opposite of the other. So when by_Size is toggled on, by_Copies should automatically turn off and vice versa.
I am fairly new to Houdini so I thought maybe I am overlooking something I don't know about yet.
Cheers!
Assign code-value to a Toggle Interface Parameter
5587 2 2-
- aarondornez
- Member
- 25 posts
- Joined: Nov. 2016
- Offline
-
- goldfarb
- Staff
- 3465 posts
- Joined: July 2005
- Online
-
- Enivob
- Member
- 2658 posts
- Joined: June 2008
- Offline
Place a pythonscript node inside your subnet. Then setup a callback script hook for each toggle. When the toggle changes the script will run.
Here is the example code that you can place in a callback script.
You must also remember to switch the processing language for the callback from HScript to Python.
Here is the example code that you can place in a callback script.
exec(hou.node("/obj/subnet1/pythonscript_INTERFACE_CODE").parm('python').eval());toggle1Option()
Edited by Enivob - March 30, 2017 09:57:57
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
-
- Quick Links

