Mel and Game Exporter

Mel and Game Exporter

Anonymous
Not applicable
853 Views
2 Replies
Message 1 of 3

Mel and Game Exporter

Anonymous
Not applicable

Hi, I can't figure this out for the life of me.

 

> Using Mel, how can I change from the Game Exporter tab group "Model" to "Animation Clips"?

 

I've tried Script Editor + Echo All Commands and looked online, but I can't seem to find it. I'm sure it's super easy, but I don't really do any programming at all. Thanks!

 

Mel.png

854 Views
2 Replies
Replies (2)
Message 2 of 3

legcdesign
Participant
Participant

I'm an animator, so this is my best attempt to do that. I took from another script and made a modification. The Game Exporter needs to be open, so I added it to the script. Hope it helps

global proc gameExp_ChangeToAnimationTab()
{
    string $animationTab = "gameExporterTabLayout|gameExporterWindow|gameExporterFormLayout|gameExporterAnimationTab";
    string $currentTab = `tabLayout -q -st gameExporterTabLayout`;

    if($currentTab != $animationTab)
    {
        tabLayout -edit -selectTab $animationTab gameExporterTabLayout;
    }
    gameExp_UpdatePrefix;
    gameExp_PopulatePresetList();gameExp_CreateExportTypeUIComponents(); 
}
gameFbxExporter() //Open the Game Exporter
gameExp_ChangeToAnimationTab() // Change to the Animation Tab

 

Message 3 of 3

Kahylan
Advisor
Advisor

Hi!

 

Not quite sure why you need to do this in Mel. But this command should do it:

gameFbxExporter();
tabLayout -e -sti 2 "gameExporterTabLayout";

 

It does the same as the script from @legcdesign, I just removed some clutter. You don't need to query the current tab first since the select Tab command doesn't error out if you select the currently selected tab again. Also a lot of the script were built in functions that maya automatically triggers when the tab is changed so they were not really needed.

 

I hope it helps!