![fbx exporter fbx exporter](https://i.ytimg.com/vi/MxxJimcPYs8/maxresdefault.jpg)
The arguments for the calls are the same as for the equivalent mel calls, however they can be passed with typical This module provides a python wrapper for every method exposed in the FBX plugin.
#Fbx exporter code
I prefer this to doing it in code because the presets will force all the settings in one go, so I don’t have to worry about the state a user might have left things in when I wasn’t looking.įWIW, here’s a link to the wrapper I use to avoid all the mel garbage: I distribute my fbx presets as data (along with things like icon bitmaps or binaries) and access them them that way. My exporter loads the export preset appropriate to a given file and exports it. I generally don’t allow users to do ‘raw’ fbx exports into game data - there are too many things they might mess up – but I don’t care what they do if they are making an FBX outside the game. If needed, I can do this but it would take a lot more time. This would take a lot longer and would be far worse to look at, code wise, as it could theoretically add several hundred lines of code. Does anyone know how I can use a variable so that we can find the file across multiple platforms?Īlso, if the above cannot be done, my other option is to find every single line of code that is needed to export the different types of files I am looking for. So obviously it is not looking for the correct location. Error: $perforce\UE4\HGGame\ArtScripts\Maya\Animation.fbxexportpreset // Error: MelError: file C:\Program Files\Autodesk\Maya2014\Python\lib\site-packages\pymel\core\language.py line 846: Error during execution of MEL script: Preset file not found. Replacing any relevant pieces of the filepath returns: I want to use $ so that we can replace the E:/ and have Maya automatically locate the file it needs. The issue with the above MEL code is that my team’s file path to PerForce are all different. Use syntax: FBXLoadExportPresetFile -f “filepath” # Pm.mel.eval(‘FBXLoadExportPresetFile -f “E:/PerForce/WorkSpace/UE4/HGGame/ArtScripts/Maya/Animation.fbxexportpreset” ’)Īs a note, I have tried to make a straight pymel command but am returned with this error: Error: RuntimeError: file line 2: FBXLoadExportPresetFile: Error bad syntax. I can load the script on my computer using the following code: Either load “preset files” which I have already placed in a special location on PerForce. The same can be said for the skeletalMesh. What this tool will do is allow the animator (or tech-artist) to export their animation using a click of a button rather than have to go into the FBX exporter function inside of Maya. This tool includes an FBX exporter using two presets, one for a skeletalMesh and one for animation on that skeletalMesh. I am currently working on a tool for my production.