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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top