- Home /
Hooking into Unity FBX Export from Maya
I saw that Unity uses a MEL script when exporting from Maya. I'd like to make maya write out some extra data for me to use when it reads in the Maya scene. What I want to know is, what is the best practice way to hook my own procedure calls into this script?
Thanks, Grant
I think you need to ask this in a $$anonymous$$aya forum as its not a Unity3D question (sorry). The script runs in $$anonymous$$aya, therefore its a $$anonymous$$aya-script problem.
I think this is actually a Unity question because Unity calls $$anonymous$$aya to do the work and when it does, it passes the script. I am not looking for how the $$anonymous$$EL works, what I wanted to find out is has anyone modified that script for their own pipeline? If so, are there any gotchas or best practices for hooking into this script. Are there other ways to hook into this other then modifying the factory scripts? Are there things that can be included on the Unity side as "Pre" and "post" export script hooks?
Answer by Bunny83 · Jul 20, 2011 at 06:12 AM
Well, if you know how to script in MEL ( i don't ;) ) you can change the export script the way you like but you should create a backup in case you mess something up. Just go to your Unity installation folder: /Editor/Data/Tools/
there you will find the exportscripts that are used by Unity. In your case (Maya) there are 3 scripts (at least on my installation Unity 3.0): FBXMayaMain.mel
FBXMayaExport.mel
FBXMayaExport5.mel
There are also two more scripts, one for 3ds Max and one for blender. Just in case someone else wants to change the export script.
Bunny83,
I think you are right. I'll try modifying the FBX$$anonymous$$aya$$anonymous$$ain.mel file first and see where I get.
I was curious if anyone else had tried this and had some wisdom to pass along. :)
Grant
Your answer
![](https://koobas.hobune.stream/wayback/20220612151205im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Export FBX files to unity that contain bones without weights 1 Answer
Why Mel Scripted Animation Won't Play in Unity 1 Answer
adding blendshapes to a rig breaks existing fbx-animations unneccesarily 0 Answers
Maya/Unity FBX Round-trip Not Working 0 Answers
Maya LT - Export group as single FBX 0 Answers