Skip to content

Exporter Reference

Technical Details

Use this reference for translator names, scripting entry points, MEL options, and implementation details behind the Maya exporter.

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, gltf Default: glb
  • resFormat: bin, source, embedded Default for the registered translator: source
  • texFormat: auto, jpeg, webp Default: auto
  • texQuality: 0 to 100 Default: 90
  • texOverwrite: 0 or 1 Default: 1
  • copyright: freeform string
  • assetMinVersion: 2.0 or empty Default: 2.0 Sets the asset.minVersion field 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 at 2.0 unless you have a specific loader requirement.

Animation Options

  • anim: none, keyed, baked, time_editor Default: time_editor

Mesh Options

  • exportTangents: 0 or 1 Default: 0
  • exportGaussianSplats: 0 or 1 Default: 0
  • exportQuadTopology: 0 or 1 Default: 0

Extension and Compression Options

  • meshQuantization: 0 or 1 Default: 0
  • dracoEnabled: 0 or 1 Default: 0
  • dracoStrip: 0 or 1
  • dracoPreset: fast, balanced, high, max, custom
  • dracoCompressionLevel: 0 to 10
  • dracoQuantPos: 10 to 30
  • dracoQuantNormal: 8 to 30
  • dracoQuantTexcoord: 8 to 30
  • dracoQuantColor: 8 to 30
  • dracoQuantGeneric: 8 to 30

KTX2 Options

These are used together with the UI's KTX2 mode.

  • ktx2Enabled: 0 or 1
  • ktx2Compression: etc1s, uastc, astc, none
  • ktx2Quality: 0 to 255
  • ktx2Supercomp: 0 or 1
  • ktx2Mipmaps: 0 or 1

Metadata Objects

  • assetExtensions: JSON object string Injects additional entries into the asset.extensions object 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.extras object 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=auto together with ktx2Enabled=1.
  • The exporter resets per-export options internally, so options from one export should not leak into the next export.
  • Gaussian splat export is conditional even when enabled: the external bridge must be available.

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.