Converting Output via the Command Line
With the SGX Maya plugin, you can use MEL and Python commands to create custom scripts for processing and exporting events generated by SGX.
SGX Maya Plugin Commands
The plugin has three commands:
sgx_load_character
Loads the character definition file for the target character rig in the scene.
MEL:
sgx_load_character -c character_file [-n target_namespace]
Python:
cmds.sgx_load_character(c=character_file, [n=target_namespace])
Options:
| The path of the character file. |
| The namespace, if any, to which the character file should be retargeted. |
sgx_import
Imports a single event file as keyframed animation on the character rig.
MEL:
sgx_import -i event_file [-a]
Python:
cmds.sgx_import(i=event_file, a={0,1})
Options:
| The event to import. |
| Import audio. |
sgx_export
Converts a batch of event files into selected formats. You also have the option of using Mayabatch to do the export headless.
MEL:
sgx_export -i input_path -o output_directory -f output_formats [-a] [-b] [-s] [-p playblast_options]
Python:
cmds.sgx_export(i=input_directory, o=output_directory, f=output_formats, a={0,1}, b={0,1}, s={0,1}, p=playblast_options)
Options:
| The input path, which may be either: a directory containing the input event files, or a file containing a list of event file paths. See Input. |
| The path of the directory to which the exported output should be saved. |
| Comma-separated list of export formats including one or more of |
| Playblast options in a comma-separated list: |
| Export audio |
| Bake animation from controls to deformers (joints, blendshapes, etc.). |
| Only export selected elements of the scene. |
Here is an example of the batch export command using all of the options:
MEL:
sgx_export -i "C:/my_input" -o "C:/my_output" -f "maya,playblast" -a -b -s -p "600,800,avi,none,persp"
Python:
cmds.sgx_export(i="C:/my_input", o="C:/my_output", f="maya,avi", a=1, b=1, s=1, p="600,800,avi,none,persp")