The following MEL commands are used to emulate export options in the FBX export user interface.
FBXExport -f [filename] [-s];
Exports the specified file.
Add the -s flag if you want to change the export process so it exports the selected objects instead of an “export all” operation.
For example:
FBXExport -f myfile.fbx -s
FBXExportAnimationOnly -v [true|false];
FBXExportAnimationOnly -q;
Use this script to export only animation. See Animation for more information.
FBXExportApplyConstantKeyReducer -v [true|false];
FBXExportApplyConstantKeyReducer-q;
This is the script equivalent of the Constant Key Reducer.
FBXExportAxisConversionMethod [none|convertAnimation|addFbxRoot];
FBXExportAxisConversionMethod -q;
This command lets you set an export conversion method. See Axis conversion for more information.
FBXExportBakeComplexAnimation -v [true|false];
FBXExportBakeComplexAnimation -q;
This command is the script equivalent of the Bake animation option. See Bake Animation.
FBXExportBakeComplexEnd -v [int];
FBXExportBakeComplexEnd -q;
This command is the script equivalent of the End field in the Bake animation option. The passed value is an integer number. See Bake Animation for more information.
FBXExportBakeComplexStart -v [int];
FBXExportBakeComplexStart -q;
This command is the script equivalent of the Start field in the Bake animation option. The passed value is an integer number. See Bake Animation for more information.
FBXExportBakeComplexStep -v [int];
FBXExportBakeComplexStep -q;
This command is the script equivalent of the Step field in the Bake animation option. The passed value is an integer number. See Bake Animation for more information.
FBXExportBakeResampleAll -v [true|false];
FBXExportBakeResampleAnimation - q;
This command is the script version of the Resample Animation option in the FBX Exporter. See Resample All.
FBXExportCacheFile -v [true|false];
FBXExportCacheFile -q;
This command is the script version of the Geometry Cache file(s) option in the FBX Exporter. See Geometry Cache File(s).
FBXExportCameras -v [true|false];
FBXExportCameras -q;
Use this function to either include or exclude cameras in your FBX export. See Cameras for more information.
FBXExportColladaFrameRate [float];
FBXExportColladaFrameRate -q;
This function is the script equivalent of the Collada option.
FBXExportColladaSingleMatrix [true|false];
FBXExportColladaSingleMatrix -q;
This command is the script equivalent of the Collada Single matrix option.
FBXExportColladaTriangulate [true|false];
FBXExportColladaTriangulate - q;
This command is the script equivalent of the Collada Triangulate option.
FBXExportConstraints -v [true|false];
FBXExportConstraints -q;
Causes all the constraints defined in the Maya scene to be either included or excluded from the exported FBX file. See Constraints.
FBXExportConvertUnitString [mm|dm|cm|m|km|In|ft|yd|mi];
This command returns the Scale Factor required to convert one centimeter to the specified unit and is the script version of the File Units Converted To menu in the FBX Exporter and Importer windows. SeeScene units converted to for more information.
FBXExportDxfTriangulate [true|false];
FBXExportDxfTriangulate -q;
FBXExportDxfDeformation [true|false];
FBXExportDxfDeformation - q;
FBXExportEmbeddedTextures -v [true|false];
FBXExportEmbeddedTextures -q;
FBXExportFileVersion -v [version];
Where [version] is the following:
FBXExportGenerateLog -v [true|false];
FBXExportGenerateLog -q;
Use this command to generate a log file on export. See Generate log data for more information.
FBXExportHardEdges -v [true|false];
FBXExportHardEdges -q;
Duplicates all vertices in the scene's meshes for each polygon connected to them. The vertices’ normals are set accordingly, depending on whether they are connected to a hard or smooth edge.
If two vertices are located exactly at the same position, a warning is issued, as this causes unpredictable results when FBXImportHardEdges is set to True.
This command is the script version of the Split per Vertex Normals option in the FBX Exporter. See Include.
FBXExportInAscii -v [true|false];
FBXExportInAscii -q;
Use this function to export as an ASCII file. See Type for more information.
FBXExportInputConnections -v [true|false];
FBXExportInputConnections –q;
Use this function to query the current value of the input connection option. The function returns 0 for False, and 1 for True.
Use this function with the FBXExport -f [filename][s] script if you are performing an export of selected objects. Set False so that the input connections to selected objects are not considered during export. The default value for this command is True, which makes the plug-in include all the objects that influence the selected ones.
This is the script equivalent of the Connections option in the UI.
FBXExportInstances -v [true|false];
FBXExportInstances -q;
This is the script equivalent of the Preserve Instances option in the UI.
FBXExportLights -v [true|false];
FBXExportLights -q;
Use this function to either exclude or include lights in the exported FBX file. See Lights for more information.
FBXExportQuaternion -v [quaternion|euler|resample];
FBXExportQuaternion -q;
Use the quaternion interpolation script to select how to export your quaternion interpolations from the host application.
FBXExportQuickSelectSetAsCache –v “setName”;
FBXExportQuickSelectSetAsCache –q;
This command stores the setName as the set to be used when exporting the cache file.
This command does not validate the received string. However, if the string used here does not correspond to an existing (and valid) set in the Maya scene, the cache export fails.
FBXExportReferencedAssetsContent -v [true|false];
FBXExportReferencedAssetsContent -q;
FBXExportScaleFactor [float];
FBXExportScaleFactor -q;
This command is the script version of the Scale Factor field in the FBX Exporter. See Scale Factor for more information.
FBXExportShapes -v [true|false];
FBXExportShapes -q;
Use this function to either exclude or include shape deformations with your FBX file. See Deformed Models for more information.
FBXExportSkeletonDefinitions -v [true|false];
FBXExportSkeletonDefinitions -q;
Use this function to either include or exclude Skeleton definition in your export.
FBXExportSkins -v [true|false];
FBXExportSkins -q;
Use this function to either exclude or include skin deformations in your FBX file. See Deformed Models for more information.
FBXExportSmoothingGroups -v true|false;
FBXExportSmoothingGroups -q;
This command is the script version of the Smoothing Groups option in the FBX Exporter. See Smoothing Groups for more information.
FBXExportSmoothMesh -v true|false;
FBXExportSmoothMesh -q;
Use this function to export the subdivision level of the mesh.
FBXExportSplitAnimationIntoTakes -q
FBXExportSplitAnimationIntoTakes -c
FBXExportSplitAnimationIntoTakes -v
This command lets you export an ainmation file into multiple takes.
Internally, frames are expressed in seconds. The conversion from frame to seconds is performed using the current application framerate. After definitions are available, calling FBXExportSplitAnimationIntoTakes -q. This returns:
// Result: name=toto start=1 end=5 name=toto start=10 end=25 name=toto start=3 end=20 //
FBXExportTangents -v [true|false];
FBXExportTangents -q;
This command is the script version of the Tangents and Binormals option in the FBX Exporter.
FBXExportTriangulate -v [true|false];
FBXExportTriangulate -q;
This command is the script version of the Triangulate option in the FBX Exporter.
FBXExportUpAxis [y|z];
FBXExportUpAxis -q;
This command lets you define the up axis in your FBX file. The up axis is the global axis that points upwards. See Axis conversion for more information.
By default, the up axis in Maya is the Y axis.
FBXExportUseSceneName -v [true|false];
FBXExportUseSceneName -q;
This command is the script version of the Use scene name option in the FBX Exporter.