We’ve been investigating a method of executing distributive command-line driven exporting. The principle is simple, using the “maya” prompt command, a scene can be loaded, a specified OnOpen mel scriptnode can be sourced, calling for the export of specific scene assets.
This is fairly straight forward, the only stumbling block is the compiled sgpuMachExport.mll invokes a fileDialog box before processing the export commands, which freezes our automated scripts.
If the sgpuWriteCamera, and sgpuWriteVerts commands would include a flag to bypass the user interactive dialog and allow for an addition of two variables [FileName, FilePath], we could proceed to develop this script.
On our current production, this issue would be a life saver. We have artists locked to computers for an entire shift during exporting.
Here is a [possilby] example maya commandline:
maya -proj C:\PROJECTS\PM_Export -file c:\PROJECTS\PM_Export\Scenes\010_010_INB_000.ma -script c:\PRPJECTS\PM_Export\scripts\010_010_exportlist.mel
And the exportlist.mel might look like this:
select -r amelia:amelia_msexportA ;
string $fileName = “010_010_amelia_shot01_000.gab”;
string $filePath = “c:\PROJECTS\PM_Export\Shots\010_010\Data”;
sgpuExportAnim -fname $fileName -fpath $filePath;select -r jack:jack_msexportA ;
string $fileName = “010_010_jack_shot01_000.gab”;
string $filePath = “c:\PROJECTS\PM_Export\Shots\010_010\Data”;
sgpuExportAnim -fname $fileName -fpath $filePath;select -r master_cameraShape
string $fileName = “010_010_camera_000.cam”;
string $filePath = “c:\PROJECTS\PM_Export\Shots\010_010\Data”;
sgpuWriteCamera -fname $fileName -fpath $filePath;