0

How can I do this? I've looked through the Maya documentation and all I can see that's related are the commands refreshAE and updateAE, but they don't do the job I need.

Ben
  • 1,321
  • 15
  • 30

1 Answers1

1

Here is one way of doing it. This proc is tested in Maya 2009 and 2013.

//  switch the tab by name string, note tab must be present 

global proc switchAEtoTab(string $name ){
    global string $gAETabLayoutName;
    string $tabs[] = `tabLayout -q -tabLabelIndex $gAETabLayoutName`;
    for ($i=0;$i<size($tabs);$i++){
       if ($tabs[$i]==$name)
          tabLayout -e -selectTabIndex ($i+1) $gAETabLayoutName; 
    }
}

Edit: updated script to contain the global name of the tab layout

joojaa
  • 4,354
  • 1
  • 27
  • 45