[SOLVED] Problem exporting FBX from Maya without animation

I’m writing a tool to export skeletal meshs, static meshes, and character animation FBX files from Maya for use in UE4. Publishing via the Send to Unreal plugin works fine, but I can’t reproduce those settings within my script. Here’s what I have so far:

mel.eval('FBXResetExport')
mel.eval('FBXExportSmoothingGroups -v true')
mel.eval('FBXExportSmoothMesh -v true')
mel.eval('FBXExportAnimationOnly -v false') 
mel.eval('FBXExportInputConnections -v false')
mel.eval('FBXExportUpAxis y')
mel.eval('FBXExportFileVersion -v 201600')

I figured setting AnimationOnly and InputConnections to false would do the trick, but it’s not working,

I’ve considered loading a preset file, but I’d like to give the artist some flexibility by allowing to change select settings if need be.

So this is basically what we’re using. Make sure on the UE4 side, that your import settings are on Import and not Compute.

cmds.FBXResetExport()
cmds.FBXExportHardEdges('-v', True)
cmds.FBXExportSmoothingGroups('-v', True)
cmds.FBXExportTangents('-v', True)
1 Like

Ahhhh, much better than the MEL eval, thanks for this!

I’m still having the same problem though: No matter what settings I use, I can’t prevent animation from publishing to the asset.

For example, if I put a few keys on a cube, uncheck the Animation box in the Send to Unreal plugin, and then export, when I bring the file back into Maya it doesn’t have animation on it (This is working how I want it to). I would think that the settings I used in my initial post would give me the same results, but it’s still publishing WITH the keys on the object (Not what I want). Any insight into the proper settings?

Try adding

cmds.FBXExportBakeComplexAnimation('-v', False)

Or going the full nuclear option:

cmds.FBXProperty('Export|IncludeGrp|Animation', '-v', 0)

For some reason using the FBXProperty won’t accept an actual bool, so you have to use 0 or 1

1 Like

Nuclear option was the way to go! Thanks for the help :smiley:

Hey Bob,
I just wanted to confirm, when exporting with HardEdges, I seem to be getting scrambled UVs in Channel2 for skeletal meshes and for skeletal meshes with blendshapes, the vertex mapping appears to be broken and vertices tear. All when exporting with HardEdges = True. Do you not have the same results?

@Randall_Hess
Damn that sounds weird.
So when you say Channel2 is that the 2nd or 3rd uv channel?
Do you get the same scrambling without blendshapes?

Is the scrambling happening in the FBX file? or is it only after unreal imports them?