how to change default tab focus using Python?

   4347   2   1
User Avatar
Member
194 posts
Joined:
Offline
is there a way to do it?
for example when a geo object is in focus with .setCurrent(True), i want the user automatically to see a specific tab, not the Transform tab, which is in focus by default.
User Avatar
Staff
2678 posts
Joined: July 2005
Offline
whalerider
is there a way to do it?
for example when a geo object is in focus with .setCurrent(True), i want the user automatically to see a specific tab, not the Transform tab, which is in focus by default.

There is a parameter associated with the folder tab, so yes. However, determining that parameter is a little tricky.

When I put down a geometry object, the parameter for the folder is ‘stdswitcher5’, so:

parm = obj.parmTuple('stdswitcher5')
parm.set( (2,) )

will display the “Render” tab.

If you always want this to be the case, then you might consider using the Tool menu and choosing “Save as Permanent Defaults”
User Avatar
Member
194 posts
Joined:
Offline
Thanks, Mark.

With hindsight, I see that hou.FolderSetParmTemplate is the class to look at.

ps: I need to do this with Python, because a tool I am writing automatically creates a custom tab with spare parameters.
  • Quick Links