glTF 2.0 exporter for Autodesk Maya
glTF exporter plugin for Autodesk Maya
This plugin is compatible with most modern versions of Maya. Tested with Maya 2015+. Most of the glTF spec has been implemented, but this is still a work in progress. For best material results use StingrayPBS shader. Report any issues here!
glTFExport.py
and glTFTranslatorOpts.mel
from the scripts
folder need to be copied to the scripts folder here:OS | Path |
---|---|
(Windows) | C:/Users/<username>/Documents/maya/<version>/scripts |
(Mac OS X) | Library/Preferences/Autodesk/maya/<version>/scripts |
(Linux) | $MAYA_APP_DIR/maya/<version>/scripts |
glTFTranslator.py
from the plug-ins
folder needs to be copied to the plug-ins folder here (create a plug-ins folder if you don't have one):OS | Path |
---|---|
(Windows) | C:/Users/<username>/Documents/maya/<version>/plug-ins |
(Mac OS X) | Library/Preferences/Autodesk/maya/<version>/plug-ins |
(Linux) | $MAYA_APP_DIR/maya/<version>/plug-ins |
import glTFExport
glTFExport.export(r"C:\Temp\test.glb", resource_format='bin', anim='keyed', vflip=True)
Parameter | Description |
---|---|
file_path | Path to export the file to. File extension should be .glb or .gltf |
resource_format | How to export binary data. Only applies to .gltf format. Valid value: 'bin', 'source', 'embedded'. bin - A single .bin file next to the .gltf file. source - Images are copied next to the .gltf file. embedded - Everything is embedded within the .gltf. |
anim | How to deal with animation. Valid values: 'none', 'keyed'. none - Don't export animation. keyed - Respect current keys |
vFlip | GL renderers want UVs flippedin V compared to Maya. Set to False if you don't need to fix the flipping. |