Exporter Reference
Technical Details
Use this reference for translator names, scripting entry points, MEL options, and advanced exporter behavior.
Translator Name
Maya registers the exporter as glTF2.0 Export.
MEL Examples
Export Selection
file -force -options "fileFormat=glb;resFormat=source;anim=time_editor;texFormat=auto;texQuality=90;dracoEnabled=0;meshQuantization=0;exportTangents=0;exportGaussianSplats=0;exportQuadTopology=0;assetMinVersion=2.0;" -type "glTF2.0 Export" -preserveReferences -exportSelected "C:/temp/asset.glb";
Export All
file -force -options "fileFormat=gltf;resFormat=source;anim=baked;texFormat=webp;texQuality=90;dracoEnabled=1;dracoPreset=balanced;meshQuantization=0;exportTangents=1;exportGaussianSplats=0;exportQuadTopology=0;assetMinVersion=2.0;" -type "glTF2.0 Export" -preserveReferences -exportAll "C:/temp/asset.gltf";
Python Example
import maya.cmds as cmds
cmds.file(
"C:/temp/asset.glb",
force=True,
options="fileFormat=glb;anim=time_editor;texFormat=auto;texQuality=90;dracoEnabled=0;meshQuantization=0;exportTangents=0;exportGaussianSplats=0;exportQuadTopology=0;assetMinVersion=2.0;",
type="glTF2.0 Export",
preserveReferences=True,
exportSelected=True,
)
Options String Reference
All exporter options are passed as semicolon-separated key=value pairs.
Output Options
- fileFormat:
glb,gltfDefault:glb - resFormat:
bin,source,embeddedDefault for the registered translator:source - texFormat:
auto,jpeg,webpDefault:auto - texQuality:
0to100Default:90 - texOverwrite:
0or1Default:1 - copyright: freeform string
- assetMinVersion:
2.0or empty Default:2.0Sets theasset.minVersionfield in the glTF JSON output. This field signals to loaders the minimum glTF version they must support to parse the file. Most loaders ignore this field; leave it at2.0unless you have a specific loader requirement.
Animation Options
- anim:
none,keyed,baked,time_editorDefault:time_editor
Mesh Options
- exportTangents:
0or1Default:0 - exportGaussianSplats:
0or1Default:0 - exportQuadTopology:
0or1Default:0
Extension and Compression Options
- meshQuantization:
0or1Default:0 - dracoEnabled:
0or1Default:0 - dracoStrip:
0or1 - dracoPreset:
fast,balanced,high,max,custom - dracoCompressionLevel:
0to10 - dracoQuantPos:
10to30 - dracoQuantNormal:
8to30 - dracoQuantTexcoord:
8to30 - dracoQuantColor:
8to30 - dracoQuantGeneric:
8to30
KTX2 Options
These are used together with the UI's KTX2 mode.
- ktx2Enabled:
0or1 - ktx2Compression:
etc1s,uastc,astc,none - ktx2Quality:
0to255 - ktx2Supercomp:
0or1 - ktx2Mipmaps:
0or1
Metadata Objects
-
assetExtensions: JSON object string Injects additional entries into the
asset.extensionsobject in the glTF output. Provide a valid JSON object as a string, for example:{"MY_pipeline_tag":{"version":"1.2"}}. -
assetExtras: JSON object string Injects additional entries into the
asset.extrasobject in the glTF output. Use this to stamp custom pipeline metadata, build IDs, or any freeform key-value data into the exported file. Provide a valid JSON object as a string, for example:{"buildId":"42","project":"my_asset"}.
Both values must be valid JSON objects (wrapped in {}). Invalid JSON is silently ignored.
Notes
- In the UI, choosing KTX2 Format writes
texFormat=autotogether withktx2Enabled=1. - Each export starts from its own option set, so settings from one export should not affect the next export.
- Gaussian splat export is conditional even when enabled: the external bridge must be available.
Non-Stingray ORM Graph Resolution
For standardSurface, aiStandardSurface, and openPBRSurface, the exporter resolves metallic, roughness, and AO textures by tracing the real upstream source plug through optional multiplyDivide nodes.
Cheat Sheet
| Source setup | Allowed? | Conditions | Export result |
|---|---|---|---|
| Separate grayscale AO only | Yes | Connect through gltfAO; outColor, outColorR, outColorG, or outColorB are all valid; any single multiplyDivide lane X, Y, or Z is valid |
Original grayscale image exports as occlusionTexture |
| Separate grayscale metallic only | Yes | outColor, outColorR, outColorG, or outColorB are all valid; any single multiplyDivide lane X, Y, or Z is valid |
Original grayscale image exports as metallicRoughnessTexture |
| Separate grayscale roughness only | Yes | outColor, outColorR, outColorG, or outColorB are all valid; any single multiplyDivide lane X, Y, or Z is valid |
Original grayscale image exports as metallicRoughnessTexture |
| Separate grayscale metallic + roughness | Yes | Source images must have matching dimensions if the exporter needs to repack them | Exporter generates a packed MR texture |
| Separate grayscale AO + metallic | Yes | AO must connect through gltfAO; source images must have matching dimensions if repacked |
Exporter generates a packed OM texture |
| Separate grayscale AO + roughness | Yes | AO must connect through gltfAO; source images must have matching dimensions if repacked |
Exporter generates a packed OR texture |
| Separate grayscale AO + roughness + metallic | Yes | AO must connect through gltfAO; all source images must have matching dimensions |
Exporter generates a packed ORM texture |
One shared multiplyDivide node for grayscale AO, roughness, and metallic |
Yes | Exporter traces the actual upstream plug; each signal may use any lane X, Y, or Z |
Same result as the matching grayscale row above |
Separate multiplyDivide nodes per grayscale channel |
Yes | Each signal may use any lane X, Y, or Z |
Same result as the matching grayscale row above |
| Packed ORM using one shared texture node | Yes | Metallic must come from source B, roughness from source G, AO from source R via gltfAO; the multiplyDivide lane may still be X, Y, or Z |
Source image is reused as metallicRoughnessTexture; AO is also reused only when gltfAO is connected |
| Packed ORM using multiple texture nodes that point to the same file | Yes | Same source-channel rules as above; file path must resolve to the same image | Same as shared packed ORM reuse |
Packed ORM with one shared multiplyDivide node |
Yes | Same packed source-channel rules: R = AO via gltfAO, G = roughness, B = metallic |
Same as shared packed ORM reuse |
Packed ORM with separate multiplyDivide nodes |
Yes | Same packed source-channel rules: R = AO via gltfAO, G = roughness, B = metallic |
Same as shared packed ORM reuse |
| Packed metallic + roughness from one image, AO from a different file | Yes | Metallic and roughness must still resolve to the same packed image; AO stays separate through gltfAO |
Packed image exports as metallicRoughnessTexture; AO exports as a separate occlusionTexture |
Packed ORM without gltfAO connected |
Yes | Metallic must come from source B and roughness from source G | Exporter writes metallicRoughnessTexture only; no occlusionTexture is emitted |
Rules to remember
- For dedicated grayscale AO, roughness, and metallic maps, source channel and
multiplyDividelane are flexible. - For packed ORM reuse, source channel is strict even though the
multiplyDividelane is flexible: R = AO, G = roughness, B = metallic. - When the exporter generates a packed
OR,OM,MR, orORMtexture, the source images must have matching dimensions.
For custom material attributes, alpha mode setup, and shader-specific notes, see Material Authoring. For UV set assignment and exporter resolution order, see UV Set Selection.