studioGPU

 
   
 

You must be signed-in to post a topic or reply

Command line exporting
Posted: 10 April 2009 11:12 AM   [ Ignore ]
Newbie
Rank
Total Posts:  3
Joined  2009-04-01

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;

 Signature 

Zeth duBois
XLT TD

Profile
 
 
Posted: 13 April 2009 11:05 AM   [ Ignore ]   [ # 1 ]
Administrator
Rank
Total Posts:  16
Joined  2009-03-03

There is a argument like that that lets you specify the full path including file name to export. You can use either the argument “-File” or the short form “-f”.

For instance,
sgpuWriteCamera -bake -f “c:\PROJECTS\PM_Export\Shots\010_010\Data\010_010_camera_000.cam”;

Profile
 
 
Posted: 13 April 2009 05:54 PM   [ Ignore ]   [ # 2 ]
Administrator
RankRank
Total Posts:  40
Joined  2009-03-06

We also added a “-confim” flag to allow a batch file to skip the flag confirmation dialog about double-sided surfaces, etc. If this argument is used, then the confirmation dialog is skipped.]

this will be available in sgpuMachExporter for Maya version 1.1.2.. soon to be released

Profile
 
 
Posted: 13 April 2009 07:58 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  3
Joined  2009-04-01

I’ve installed the latest exporter and associated scripts sent to me from King Pytos today (Plug-in version 1.1.2)
I’m a bit confused.  The info window for the plugin says the commands are sgpuWriteMode, WriteCamera, WriteVerts.  It doesnt say what the commands for export anim are, but the GUI windows calls “sgpuExportAnim”

I tried sgpuExportAnim -file “C:\PROJECTS\PM_Export\Export\010_010_amelia_000.gab”, with the following output
// Error: Wrong number of arguments on call to sgpuExportAnim. //

The additional -confirm flag that King Pytos spoke of would skip the warning flags when generating models, which might be useful, but I doubt we’ll ever batch that process.

What did I miss?

Yeti

 Signature 

Zeth duBois
XLT TD

Profile
 
 
Posted: 01 May 2009 03:02 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  1
Joined  2009-05-01
Yeti - 13 April 2009 07:58 PM

I’ve installed the latest exporter and associated scripts sent to me from King Pytos today (Plug-in version 1.1.2)
I’m a bit confused.  The info window for the plugin says the commands are sgpuWriteMode, WriteCamera, WriteVerts.  It doesnt say what the commands for export anim are, but the GUI windows calls “sgpuExportAnim”

I tried sgpuExportAnim -file “C:\PROJECTS\PM_Export\Export\010_010_amelia_000.gab”, with the following output
// Error: Wrong number of arguments on call to sgpuExportAnim. //

The additional -confirm flag that King Pytos spoke of would skip the warning flags when generating models, which might be useful, but I doubt we’ll ever batch that process.

What did I miss?

Yeti

the animation file is designated with a flag with the sgpuWriteModel command

ex.
sgpuWriteModel -anim -bake -f “C:\PROJECTS\PM_Export\Export\010_010_amelia_000.gab”

Profile
 
 
Posted: 01 May 2009 11:43 PM   [ Ignore ]   [ # 5 ]
Administrator
Rank
Total Posts:  16
Joined  2009-03-03

“sgpuExportAnim” is a MEL script routine that maps to the vertex baking exporter “sgpuWriteVerts -anim”, so the command would look like:

sgpuWriteVerts -anim -f “C:\PROJECTS\PM_Export\Export\010_010_amelia_000.gab”

sgpuWriteModel is the hierarchical animation export command which has more requirements on rigging but produces more efficient animation files.

We will expand the documentation on the exporter to explain these more advanced exporting options.

Profile
 
 
   
 
 
RSS 2.0     Atom Feed