Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top