hyperforce Posted September 24, 2012 Share Posted September 24, 2012 (edited) I am trying to make an interface where only the objects of a certain group are visible, when the corresponding folder tab in the interface is opened. I'm using a multiparm tab group in order to allow for an unlimited amount of groups to be controlled. So if I have 5 groups, then only 5 tabs are needed, etc. If I use a a series of radiobutton folders I can call the currently selected folder tab with a ch("") expression. But if I do this with a multiparm, it returns the total amount of tabs currently visible, not the number of the currently selected tab. So my question is, is there a way to return the number of the currently selected tab in a multiparm tab group? Edited September 24, 2012 by hyperforce Quote Link to comment Share on other sites More sharing options...
rafaelfs Posted September 24, 2012 Share Posted September 24, 2012 Can you set the tabs instead to radio button tabs? You should be able to read back that one. Cheers Quote Link to comment Share on other sites More sharing options...
Macha Posted September 24, 2012 Share Posted September 24, 2012 (edited) hou.node('.').parm('Nameoftab').eval() works for me Edited September 24, 2012 by Macha 1 Quote Link to comment Share on other sites More sharing options...
hyperforce Posted September 24, 2012 Author Share Posted September 24, 2012 (edited) hou.node('.').parm('Nameoftab').eval() works for me Thanks, I have a question through, how do I find the name of the tab(s)? A multiparm creates instanced folders, the tabs themselves have numbers but using the # doesn't work, neither does typing in a number or the name of the folder work. That or i'm doing something wrong. I used the python shell with hou.node('../../subnet1').parm('folder').eval() But all this gives me is 10, the total number of tabs. So how do I use this to retrieve the active tab? Edited September 24, 2012 by hyperforce Quote Link to comment Share on other sites More sharing options...
Macha Posted September 24, 2012 Share Posted September 24, 2012 It's...fairly fiddly. In your parameter properties you have to call the name with a number at the end. The fiddly bit is getting it to work!! I usually click random buttons and names until it coughs out something that works, so I end up with idiotic names like method_0_3b_4, but once they work I don't touch it anymore. So, tabs labelled with something like: blabla_0 blabla_1 blabla_2 etc. and then you get the numbers at the end of those labels with the expression above. Quote Link to comment Share on other sites More sharing options...
hyperforce Posted September 24, 2012 Author Share Posted September 24, 2012 (edited) Just so we are on the same page, I do know a way to make radio-buttons and other folder tabs work this way: If you want to say, hook something like a switch up to radio buttons, you should name the groups like so: folder folder1 folder2 folder3 (ensure they are all in the same folder group) Then reference them as such CH("../folder1") (the number is important) Once houdini updates the node that uses the ch() expression, it should cause the selected radio button to reference to a number. 0 = folder 1 = folder1 2 = folder2 3 = folder3 However, when you create a multiparm, it only has ONE folder (with controls inside). This folder is then instanced # amount of times. Normally you can then call upon the controls by typing their name with # at the end. This example can be used when you are using a foreach node for example: ch("../instancedParameter" + stamp("../","FORIDXVALUE",0) ) But the CH("../folder") expression when used with a multiparm folder references to the total number of instances that are currently created. And ch("../folder1") results in a bad parameter reference or 0, as does ch("../folder#") and ch("../folder" + "#" ). Edited September 24, 2012 by hyperforce Quote Link to comment Share on other sites More sharing options...
Macha Posted September 24, 2012 Share Posted September 24, 2012 Uhh....hmm.. I don't know... multiParmInstances() gives you a list of all parameters in the folders that you instance. Maybe that helps a little. Quote Link to comment Share on other sites More sharing options...
hyperforce Posted September 24, 2012 Author Share Posted September 24, 2012 Uhh....hmm.. I don't know... multiParmInstances() gives you a list of all parameters in the folders that you instance. Maybe that helps a little. In any case, Thanks for the help Macha Quote Link to comment Share on other sites More sharing options...
martinkindl83 Posted December 3, 2020 Share Posted December 3, 2020 hello, have you found solution to this problem? 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.