How to find currently selected tab in multiparm folder?

   4453   7   4
User Avatar
Member
20 posts
Joined: July 2012
Offline
Hello,

I have a Multiparm Block (tabs) that allows users to position objects within my Digital Asset. The objects have a fairly large stack of attribs, and I'd like to give the user a visual indication of which object their currently selected tab refers to. Is there any way to read the currently selected multiparm tab?

When dealing with regular (non-multiparm) folders, you can open a Python shell and do:
hou.node('/obj/myhda1').parm('tabfolder').eval()
… and it tells you which (non-multiparm) tab is selected by index.

But, when you call eval() on a multiparm folder parameter, you do not get the index of the currently selected folder. Houdini returns the integer total count of multiparms created.

Seems this question has been asked before [sidefx.com], a couple of years ago, and was never answered. (On the ODForce boards too, [forums.odforce.net] but the replies were all misunderstanding the multiparm block part.) I have the exact same question as that guy. I don't suppose a way of doing this has surfaced since then?

Maybe there is a way to query some hidden GUI element that's responsible for showing the multiparm tabs? Or maybe a fancy way to use callback scripts?
User Avatar
Member
7725 posts
Joined: July 2005
Offline
I don't think it's possible.
User Avatar
Member
20 posts
Joined: July 2012
Offline
That would be unfortunate…

There must be a better way to correlate tab number to object it controls. All I can think of is having text float next to each object so the user can look up the correct tab number.
User Avatar
Member
1 posts
Joined: April 2016
Offline
Four years later I am running into a similar issue… Is there a way to do this now? If not misterbk, I am curious as to what your work-around was.
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
same here, would be nice to be able to get certain tab into focus
User Avatar
Member
10 posts
Joined: April 2021
Offline
did someone ever find this out?
User Avatar
Member
143 posts
Joined: May 2017
Offline
Currently there is no event handling when switching the tab menu and it is also not possible to set a default tab menu. I think they are treated as simple visibility property. A workaround is to create a separate button/toggle as a multi-parm instance which allows to set the current instance manually. You can then store the currently selected state in a separate parameter and read the data elsewhere.


There is an example in the hip file, have a look at the code in the Python module.
Image Not Found

Attachments:
selected_multi-parm.hiplc (71.8 KB)
hindie_0kmYdE5rMU.gif (78.0 KB)

User Avatar
Member
10 posts
Joined: April 2021
Offline
I wanted to see if I could have a tab be forced on the user. But I think you inspired me to go for a workaround!
  • Quick Links