matiascodesal / maya-gltf Goto Github PK
View Code? Open in Web Editor NEWglTF 2.0 exporter for Autodesk Maya
License: MIT License
glTF 2.0 exporter for Autodesk Maya
License: MIT License
When exporting it always saves as .glb no matter how I configure settings, and unable to find the .bin.
Only currently selected UV set is exported.
Can't load the plugin in Maya 2019. I get this error when I try:
// Error: file: C:/Program Files/Autodesk/Maya2019/scripts/others/pluginWin.mel line 289: (glTFExport) // // Warning: file: C:/Program Files/Autodesk/Maya2019/scripts/others/pluginWin.mel line 289: No initializePlugin() or initializePlugin2() function
If I use the plugin, it generates a file with either nothing in it or won't view. I tried using the cmd line...
import glTFExport
glTFExport.export(r"D:\Downloads\ZSU_Substance\ZSU_Substance\BellHeli_cmd.gltf", resource_format='bin', anim='keyed', vflip=True)
but I get this...
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8AC50>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8AA20>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8A828>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8AF28>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8AB38>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8ADD8>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703C18>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703160>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703B00>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013CB8E48>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C0137034A8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C0137030B8>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703128>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C9B6D8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C9B7B8>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C9BBA8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C9B550>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C9B908>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C9B278>,), {}) 0.04 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013B297B8>,), {}) 0.04 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013B299E8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013B29D30>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013B29F60>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013B29860>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013B295F8>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013B292B0>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013354908>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013354BA8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013354E10>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013354748>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C0133548D0>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C0133542B0>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013354E48>,), {}) 0.02 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01349CA58>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01349CCC0>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01349CE80>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01349C7F0>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01349C518>,), {}) 0.06 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01349C278>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01349CF98>,), {}) 0.00 sec
import glTFExport
glTFExport.export(r"D:\Downloads\ZSU_Substance\ZSU_Substance\BellHeli_cmd.gltf", resource_format='bin', anim='keyed', vflip=True)
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013CB8EF0>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013CB8E48>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013CB8FD0>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013CB8DA0>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703B00>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703908>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703748>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703390>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013703198>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8AA58>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8AD30>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8A6A0>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C011C8AF98>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013C8D710>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013C8D7F0>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013C8D6A0>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013C8D588>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013C8D5F8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013C8D2B0>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C0135397F0>,), {}) 0.04 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013539A20>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013539D68>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013539F60>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013539898>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C013539630>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C0135392E8>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01348F940>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01348FBE0>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01348FE48>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01348F780>,), {}) 0.02 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01348F908>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01348F2E8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C01348FE80>,), {}) 0.02 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C012419A90>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C012419CF8>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C012419EB8>,), {}) 0.01 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C012419828>,), {}) 0.00 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C012419550>,), {}) 0.04 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C0124192B0>,), {}) 0.03 sec
'_getMeshData' ((<glTFExport.Mesh object at 0x000002C012419FD0>,), {}) 0.00 sec
Hello,
Im probably doing something wrong, but I cant get anything to export with any trans values. Any help would be much appreciated.
Hi @matiascodesal โ Thanks for posting this plugin, it's awesome to see work toward glTF support in Maya. Quick question: have you seen https://github.com/Ziriax/Maya2glTF, which looks to me like a similar effort? I'm wondering if there are important differences between these (C++ vs Python would be one I imagine).
This is the error I get every time i try to load the plugin.
// Error: file: /Applications/Autodesk/mayaLT2020/Maya.app/Contents/scripts/others/pluginWin.mel line 317: Plug-in, "/Users/Shared/Autodesk/maya/2020LT/plug-ins/glTFExport.py", was not found on MAYA_PLUG_IN_PATH. //
Hello, I'm having an issue not being able to export out of Maya. This is the error I'm getting:
// Error: line 0: IndexError: file C:/Users/Brandon/Documents/maya/2018/scripts\glTFExport.py line 397: list index out of range //
// Error: line 0: Could not save file "C:/Users/Brandon/Desktop/anmRig_combined.glb". //
Any idea why I'm getting this error?
Thanks!
Brandon
export works fine, but import crashes maya 2022.
also i want to notice there's no gltf extension filter when importing.
is import not provided?
I'm very new to Maya - have just installed a trial of the current version from the website, in MacOS Big Sur. Following the instructions in the readme, I get an error No module named 'glTFExport'
PluginManager;
// Error: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: ModuleNotFoundError: file /Applications/Autodesk/maya2022/Maya.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py line 142: No module named 'glTFExport' //
// Warning: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: Failed to run file: /Users/Shared/Autodesk/maya/2022/plug-ins/glTFTranslator.py //
// Error: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: (glTFTranslator) //
// Error: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: ModuleNotFoundError: file /Applications/Autodesk/maya2022/Maya.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py line 142: No module named 'glTFExport' //
// Warning: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: Failed to run file: /Users/Shared/Autodesk/maya/2022/plug-ins/glTFTranslator.py //
// Error: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: (glTFTranslator) //
ProductInformation;
// Error: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: ModuleNotFoundError: file /Applications/Autodesk/maya2022/Maya.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py line 142: No module named 'glTFExport' //
// Warning: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: Failed to run file: /Users/Shared/Autodesk/maya/2022/plug-ins/glTFTranslator.py //
// Error: file: /Applications/Autodesk/maya2022/Maya.app/Contents/scripts/others/pluginWin.mel line 316: (glTFTranslator) //
I thought it might help to restart Maya, but it didn't.
In glTF meshes can have multiple primitives and each primitive can have a material. This allows for multiple materials per mesh.
I have simple model files with materials attached to it. Tried exporting it to glb files but got the following errors
// Error: line 0: RuntimeError: file /Library/Preferences/Autodesk/maya/scripts/glTFExport.py line 434: (kInvalidParameter): No element at given index // // Error: line 0: Could not save file
glTFTranslator.py is not showing up in plugin manager.
I placed everything in right directory but still this is not working...
Windows10, Maya2017
// Error: line 0: RuntimeError: file C:\Users/sidch/Documents/maya/2023/scripts\glTFExport.py line 438: (kInvalidParameter): No element at given index
Hi I was wondering if is possible to export multiple materials on the same mesh. When I try to export it is only using one material.
On Maya 2020, followed all of the steps for the GLTF Export, went into windows and loaded it, when I go export and save it says this:
// Error: line 0: RuntimeError: file C:/Users/Name/Documents/maya/2020/scripts\glTFExport.py line 438: (kInvalidParameter): No element at given index //
// Error: line 0: Could not save file "C:/Users/Name/Desktop/Random Shit/meebit/8-27/VOID.glb". //
This plugin makes excessive consumption of RAM, I tested in Maya 2019.2 on Mac and a PC and has the same problem, and basically it is processed when exporting ....... In the end I see this error ...
// Error: line 0: MemoryError: file H: / WS / My Documents / maya / 2019 / scripts \ glTFExport.py line 474: //
// Error: line 0: Could not save file "H: /Maya/default/scenes/file.glb". //
Hello
I have tried the latest version of this plugin and noticed that when the scene to be exported using the plugin is complex, it returns // Error: line 0: Could not save file whether the models have external links or not. When the scene is simple enough, it can export in glTF format, but all of the material properties are lost regardless of export settings.
Any idea how the material properties can be kept after exporting?
Could we make it compatible with the latest version of Maya?
// Warning: file: /Applications/Autodesk/maya2018/Maya.app/Contents/scripts/others/pluginWin.mel line 909: No initializePlugin() or initializePlugin2() function // // Error: file: /Applications/Autodesk/maya2018/Maya.app/Contents/scripts/others/pluginWin.mel line 909: (glTFExport)
The name of the materials are all (0)Unamed Material.. (1)Unamed Material... in the GLTF file. That's when looking at the model using Model viewer(https://modelviewer.dev/editor/). I'm using Maya 2019.
Heya! I get this message when trying to export all from Maya 2022: # Failed to write file information
// Error: line 0: RuntimeError: file C:/Users/MajesticLog/OneDrive/Documents/maya/2022/scripts\glTFExport.py line 438: (kInvalidParameter): No element at given index //
// Error: line 0: Could not save file "D:/UNITY_STUFF/ashGLTF.glb". //
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.