Jump to content

How do I read out the current selected tab number from a multiparm fol


Recommended Posts

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 by hyperforce
Link to comment
Share on other sites


works for me


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 by hyperforce
Link to comment
Share on other sites

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:





and then you get the numbers at the end of those labels with the expression above.

Link to comment
Share on other sites

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:





(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 by hyperforce
Link to comment
Share on other sites

  • 8 years later...

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...