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 in theFBX Export Options for more information.
FBXExportApplyConstantKeyReducer -v [true|false];
FBXExportApplyConstantKeyReducer-q;
This is the script equivalent of the Constant Key Reducer in the FBX Export Options.
FBXExportAxisConversionMethod [none|convertAnimation|addFbxRoot];
FBXExportAxisConversionMethod -q;
This command lets you set an export conversion method. See Axis conversion in the FBX Export Options for more information.
FBXExportBakeComplexAnimation -v [true|false];
FBXExportBakeComplexAnimation -q;
This command is the script equivalent of the Bake animation option. See Bake Animation in the FBX Export Options.
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 in the FBX Export Options 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 in the FBX Export Options 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 in the FBX Export Options 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 in the FBX Export Options for more information.
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) in the FBX Export Options for more information.
FBXExportCameras -v [true|false];
FBXExportCameras -q;
Use this function to either include or exclude cameras in your FBX export. See Cameras in the FBX Export options section for more information.
FBXExportColladaFrameRate [float];
FBXExportColladaFrameRate -q;
This function is the script equivalent of the Collada option. See Collada in the FBX Export options section for more information.
FBXExportColladaSingleMatrix [true|false];
FBXExportColladaSingleMatrix -q;
This command is the script equivalent of the Collada Single matrix option in the FBX Export options section for more information..
FBXExportColladaTriangulate [true|false];
FBXExportColladaTriangulate - q;
This command is the script equivalent of the Collada Triangulate option in the FBX Export options section for more information..
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 in the FBX Export options section for more information.
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. See Scene units converted to in the FBX Export Options for more information.
FBXExportDxfTriangulate [true|false];
FBXExportDxfTriangulate -q;
FBXExportDxfDeformation [true|false];
FBXExportDxfDeformation - q;
FBXExportEmbeddedTextures -v [true|false];
FBXExportEmbeddedTextures -q;
FBXExportFileVersion -v [version];
See FBX Version in the FBX Export Options for more information.
FBXExportGenerateLog -v [true|false];
FBXExportGenerateLog -q;
Use this command to generate a log file on export. See Generate log data in the FBX Export Options 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 in the FBX Export Options for more information.
FBXExportInAscii -v [true|false];
FBXExportInAscii -q;
Use this function to export as an ASCII file. See Type in FBX Export options 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 FBX Export options section.
FBXExportInstances -v [true|false];
FBXExportInstances -q;
This is the script equivalent of the Preserve Instances option in the FBX Export options section.
FBXExportLights -v [true|false];
FBXExportLights -q;
Use this function to either exclude or include lights in the exported FBX file. See Lights in the FBX Export options section 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;
This command is the script version of the Referenced Assets Content option in the FBX Exporter. See Referenced Assets Content in the FBX Export options section.
FBXExportScaleFactor [float];
FBXExportScaleFactor -q;
This command is the script version of the Scale Factor field in the FBX Exporter. See Scale Factor in the FBX Export options topic 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 in the FBX Export Options 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 in the FBX Export Options 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 in the FBX Export options section 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 Export options section.
FBXExportTriangulate -v [true|false];
FBXExportTriangulate -q;
This command is the script version of the Triangulate option in the FBX Export options section.
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 in the FBX Export options topic 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 Export Options.