Share
 
 

FBX MEL Scripting

This section contains scripts required for FBX scripting using Maya MEL commands.

Every Maya FBX Plug-in's MEL command begins with the FBX prefix. When error conditions are encountered, they will display error messages in the script editor window. The MEL commands that are registered by the Maya FBX Plug-in are listed in the Plug-in Manager information dialog box.

There is a scripting command for almost every option found in the Maya FBX plug-in. You can also use FBXProperty if no scripting command exists for you to use for a specific scripting workflow. With FBXProperty, you can still access the command. The FBXProperty command lets you use every option available in the FBX plug-in user interface.

Command Description
FBXProperties Use this command to list all import and export properties available. This command returns the property path, type, and current value. If the property is an Enum, it returns every possible value.
FBXProperty Import|IncludeGrp|LightGrp|Light -v true; Use this command to set an import value to true.
FBXProperty Import|IncludeGrp|LightGrp|Light -q; Use this command to query an import value.
FBXProperty Export|IncludeGrp|LightGrp|Light -v true; Use this command to set an export value to true.
FBXProperty Export|IncludeGrp|LightGrp|Light -q; Use this command to query an export value.
Note:
  • To use the FBX MEL commands, you must ensure that the Maya FBX Plug-in is active in your version of Maya.
  • The scripting commands do not affect the settings in the FBX Export/Import Presets window.
  • We recommend using the normal MEL scripting command if one exists.
  • All script commands and paths in this section are case-sensitive, so it is good practice to copy and paste them so you can have the exact path for the IO Settings when querying for a list of properties and their path.
  • These script commands support only Integer, Double, Bool, and Enum properties.

Importing FBX Files

If you are using scripts to import FBX files, use the standard File(...) if your FBX file contains no takes. For importing specific takes, use FBXImport in the FBX Import MEL commands section.

Was this information helpful?