How to properly set defaults on a scripted FBX export dialog?
Hey, I'm trying to set up a python script to automatically detect the type of game asset being created in Maya, and then export that asset to the correct directory, with the correct name.
I want to bring up the standard FBX export dialog with a preloaded preset based on the asset type, and the correct output directory selected, and a default file name suggested.
The artist will then be able to review the export options, naming, and if all is good, just need to click 'Export'.
I'm using the following call to bring up the same dialog that the main UI uses:
maya.cmds.ExportSelection()
but I can't find a clean way to pre-set the data that I want in that dialog.
I've found an EXTREMELY hacky way to do it for the Export Preset, but can't seem to figure out how to set up the directory, or the default file name. Does anyone know anything I can do?
I could setup the file defaults in fileDialog2, except that won't have the nice export settings pane.
Thanks in advance!