Hi guys,
I’m creating a wrapper to pass some configurations to the game exporter when the user presses a button.
I’ve tried with both pymel and mel but I’m not able to get it working.
The issue is that I can’t select Export Selection as a default option.
mel.eval("gameFbxExporter;")
mel.eval('tabLayout -e -sti 1 "gameExporterTabLayout";')
mel.eval('setAttr("gameExporterPreset1.exportSetIndex") 2;') # <-.this should set the Export selection property but the command is totally ignored.
mel.eval('gameExp_CreateExportTypeUIComponents;')
Do you have any idea about how to fix that?
[EDIT!]
I just found out that when the popup is open the correct settings are missing, but when I move between tabs they start showing up.
A dirty but working solution is to update first the tab (the preset) that it must not be used, and then coming back to the desired tab:
mel.eval("gameFbxExporter;")
mel.eval('tabLayout -e -sti 1 "gameExporterTabLayout";')
mel.eval('setAttr("gameExporterPreset1.exportSetIndex") 2;')
mel.eval('setAttr -type "string" gameExporterPreset1.exportFilename "'+raw_name+'" 2;')
mel.eval('tabLayout -e -sti 2 "gameExporterTabLayout";')
mel.eval('setAttr("gameExporterPreset2.exportSetIndex") 2;')
mel.eval('setAttr -type "string" gameExporterPreset2.exportFilename "'+raw_name+'" 2;')
mel.eval('gameExp_CreateExportTypeUIComponents;')
I hope you have any better solution.
thanks in advance.
Nic.