picsferro.blogg.se

Convert max to fbx unity
Convert max to fbx unity











convert max to fbx unity
  1. #Convert max to fbx unity install
  2. #Convert max to fbx unity code

Mel.eval( 'FBXExport -f “” -s’.format(exportFilePath)Īnd even then, some of these options aren’t supported between versions, such as FBXExportReferencedAssetsContent, which means you have to handle these with version checks as well, (which is where Maya really needs an environment variable or method that returns the actual version/build number that its current environment is being run in, using MAYA_LOCATION is kind of a risk if the user doesn’t install it in a standard location) Instead, I ended up using YET another mel.eval(): And even then, you can’t use mc.file to do this, because 2013 doesn’t support theĪrgument in the file() method. Mel.eval('FBXResetExport FBXExportInputConnections -v false FBXExportBakeComplexAnimation -v true FBXExportLights -v false FBXExportCameras -v false FBXExportInAscii -v true FBXExportFileVersion FBX201200 FBXExportSmoothingGroups -v false FBXExportSmoothMesh -v false FBXExportAppl圜onstantKeyReducer -v false FBXExportBakeComplexAnimation -v true FBXExportBakeComplexStep -v 1 FBXExportCameras -v false ’)īefore finally doing an actual FBX export. Instead, these options need to be passed via ugly MEL evals if you’re using Python, like so: Mc.file( exportFilePath, force=True, options=‘v=0 groups=0 ptgroups=0 materials=0 smoothing=0 normals=1’, typ='FBX export’, preserveReferences=False, exportSelected=True )

#Convert max to fbx unity code

However, a recent example of the absurdity at which how standards change between even service packs of Maya was demonstrated easily with the following code.įor example, the following code will work in Maya 2013 SP SP4, but not in 2014 standard (which my colleague was on) Much of the problems stems from the fact that the FBX scripting commands that are exposed to you in Maya are kind of done only through MEL, which means that mel.eval() becomes your best friend in this case.

convert max to fbx unity convert max to fbx unity

However, as part of my new job, I’m always looking for new ways to improve our existing (read: terrible) pipeline, and part of that is improving the way we get animations from DCC > Engine, which in this case, means from Maya to Unity. The FBX standard is so disorganized, it looks worse than the inside of my mom’s handbag.













Convert max to fbx unity