gemini Posted March 14, 2018 Share Posted March 14, 2018 (edited) Hi, Is there a way to switch between radio buttons in python and how ? Thx!! G Edited March 14, 2018 by gemini Quote Link to comment Share on other sites More sharing options...
ikoon Posted March 14, 2018 Share Posted March 14, 2018 (edited) Hi Szalbolcs, I am python newbie, so there is probably better solution. I wanted to switch Tabs (which is just different type of folder, Radio Buttons are also type of folder) with python. I solved it like this: - add new int parm (invisible) - add expression, reference the name of the first Tab (add "1" to the name) - switch that new int parm - Tabs get synced, as "side effect" Maybe you will find a better solution. Otherwise, here is mine. Attached is .py doing all these steps. EDIT: btw for some reason, the initial naming of Tabs (when the node is created) is "wrong" and gets updated as soon as you read (or update) the UI. So, in my code, I start by addSpareParmTuple() and then ask for the Tab name. This is some Houdini thing, which I don't understand. You may try to read parmTemplateGroup() entries() on a new node twice. The second time, folder names are different, updated. Then they stay like this. folders.py Edited March 14, 2018 by ikoon Quote Link to comment Share on other sites More sharing options...
gemini Posted March 15, 2018 Author Share Posted March 15, 2018 (edited) Thanks, it can NOT work for me but unfortunately I can not modify the parameters now. That's not mine. But i don't think ther is no other way to switch between radio buttons. Any other idea? THX Edited March 16, 2018 by gemini Quote Link to comment Share on other sites More sharing options...
anim Posted March 22, 2018 Share Posted March 22, 2018 you just need to know the name of the first radio button folder then for some reason append 1 to its name to be able to access it so if your folder is called 'folder', then you access it as yournode.parm('folder1') if the name is 'folder1' , then you access it as yournode.parm('folder11') that being said, to switch the radio button you just set the value on such parm, , then you switch it as yournode.parm('folder1').set(2) to try this out place Fuse SOP (let's say it's in '/obj/geo1/fuse1') fuse = hou.node('/obj/geo1/fuse1') fuse.parm('switcher1').set(1) 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.