Hi, I’m have problems using the following code to set my export settings. It appears to export but does not take into account any of the settings I have declared by code below.
import maya.cmds as cmds
import maya.mel as mel
FBX settings
mel.eval(‘FBXResetExport’) # This ensures the user’s settings are ignored.
mel.eval(‘FBXExportConvertUnitString -v cm’)
mel.eval(‘FBXExportFileVersion -v “FBX201800”’)
mel.eval(‘FBXExportSmoothMesh -v true’)
mel.eval(‘FBXExportUseSceneName -v true’)
mel.eval(‘FBXExportUpAxis y’)
mel.eval(‘FBXExportCameras -v false’)
mel.eval(‘FBXExportLights -v false’)
Also, does mel.eval('FBXProperties') dump the values correctly?
Also you can just call a lot of these functions from python directly, like the above can just be cmds.FBXProperties()
I have some code in front of me that’s essentially identical to yours which does definitely work (in Maya 2020) - the only difference between them (and I shouldn’t think this is the problem, but it might be worth mentioning) is that rather than ‘true’ or ‘false’ I’m using 1 and 0: