Skip to content

mayafbx

Python wrapper for the FBX plugin of Maya.

AxisConversionMethod

Supported axis conversions methods.

ADD_ROOT

ADD_ROOT = 'addFbxRoot'

Adds a transformation node to the top of the scene.

The node contain the transformations needed to transport the data into the new World system.

If the plug-in does not detect a need for the conversion, no Fbx_Root node is added.

CONVERT_ANIMATION

CONVERT_ANIMATION = 'convertAnimation'

Recalculates all animation curves so their values reflect the new World system.

NONE

NONE = 'none'

No conversion takes place and the exported data is unaffected.

FbxExportOptions

FbxExportOptions(**kwargs: object)

Wrapper for FBXProperty Export|* and FBXExport* mel commands.

The fields documentation are from the official Maya documentation for FBX Export MEL commands and FBX Export options.

animation

animation: bool = True

Export animation.

audio

audio: bool = True

Export audio.

The data itself are the Audio clips and tracks found in the Time Editor.

Only the active composition is processed during export.

axis_conversion_method

Set an export conversion method.

Mel Command: FBXExportAxisConversionMethod.

bake_animation_end

bake_animation_end: int = get_anim_control_end_time

Bake end frame.

Default to the Animation End Time as set in the Ranger Slider UI at the time this class was instantiated.

Requires animation and bake_complex_animation.

Mel Command: FBXExportBakeComplexEnd.

bake_animation_start

bake_animation_start: int = get_anim_control_start_time

Bake start frame.

Default to the Animation Start Time as set in the Ranger Slider UI at the time this class was instantiated.

Requires animation and bake_complex_animation.

Mel Command: FBXExportBakeComplexStart.

bake_animation_step

bake_animation_step: int = 1

Bake step frames.

Setting a step value of 2, for example, only bakes and exports a key every other frame.

Requires animation and bake_complex_animation.

Mel Command: FBXExportBakeComplexStep.

bake_complex_animation

bake_complex_animation: bool = False

Bakes (plot) all unsupported constraints into animation curves.

You can then import these curves into another application that does not support these Maya constraints.

Requires animation.

Note

  • This option alone won't bake supported animated elements, for a full bake you must also set bake_resample_all to True.
  • By default the plug-in takes the Start and End values automatically from Timeline. You can manually set bake_animation_start, bake_animation_end and bake_animation_step to bake a specific section of time.

Mel Command: FBXExportBakeComplexAnimation.

bake_resample_all

bake_resample_all: bool = False

Bake even the supported animated elements.

This is unlike bake_complex_animation which selectively bakes unsupported elements only.

Requires animation.

See constraints for a list of supported constraints elements.

Mel Command: FBXExportBakeResampleAnimation.

bind_pose

bind_pose: bool = True

Export characters bind poses.

blind_data

blind_data: bool = True

Export Blind data stored on polygons.

Blind data is information stored with polygons which is not used by Maya, but might be useful to the platform to which you export to.

For example, when you use Maya to create content for interactive game levels you can use blind data to specify which faces of the level are "solid" or "permeable" to the character, or which faces on a polygon mesh are lava and hurt the character, and so on.

bypass_rrs_inheritance

bypass_rrs_inheritance: bool = False

Bypass Rrs inheritance.

FBX File format supports three different types of transformation inheritance:

  • eInheritRrSs: Scaling of parent is applied in the child world after the local child rotation.
  • eInheritRSrs: Scaling of parent is applied in the parent world.
  • eInheritRrs: Scaling of parent does not affect the scaling of children.

Rrs stands for ParentRotate * ChildRotate * ChildScale and is the mode of inheritance used by joint hierarchy in Maya, also known as Segment Scale Compensate.

For more information, see the section FBX and scale compensation in FBX Limitations, Computing transformation matrices and facebookincubator/FBX2glTF/#27.

cameras

cameras: bool = True

Export cameras.

The Maya FBX plug-in exports camera settings, but not render settings associated to the camera with the file. This can change rendering results depending on the source application used in comparison.

During the export, Maya cameras are converted into FBX camera types for interoperability.

Why are cameras inconsistent ?

  • If you import a Maya camera into 3ds Max using a Fit Resolution Gate setting of Vertical or Fill, the results will differ.
  • For better support between Maya cameras in 3ds Max, set the Fit Resolution Gate setting to Horizontal, rather than Vertical or the default, Fill.

Mel Command: FBXExportCameras.

constant_key_reducer

constant_key_reducer: bool = False

Remove redundant keys.

Redundant keys are keys that have the same value, which are equivalent to flat horizontal interpolations on a curve. This helps to reduce the size of resampled curves, especially Scale.

Setting this to False ensures that the animation data is not filtered.

You can set specific thresholds for each type of transform:

Requires curve_filter.

Mel Command: FBXExportApplyConstantKeyReducer.

constant_key_reducer_auto_tangents_only

constant_key_reducer_auto_tangents_only: bool = True

Only filter auto key type.

When False, keys with interpolation values greater than a certain threshold may get deleted.

Requires constant_key_reducer.

Note

The Maya FBX plug-in converts all animation keys to User, which is not an Auto tangent. To ensure that constant key reducing occurs, set this to False.

constant_key_reducer_other_precision

constant_key_reducer_other_precision: float = 0.009

Threshold for other curves in generic units.

Other includes transforms like Blend Shapes and custom attribute curves.

Requires constant_key_reducer.

constant_key_reducer_rotation_precision

constant_key_reducer_rotation_precision: float = 0.009

Threshold for rotation curves in generic units.

Requires constant_key_reducer.

constant_key_reducer_scale_precision

constant_key_reducer_scale_precision: float = 0.004

Threshold for scaling curves in generic units.

Requires constant_key_reducer.

constant_key_reducer_translation_precision

constant_key_reducer_translation_precision: float = 0.0001

Threshold for translation curves in generic units.

Requires constant_key_reducer.

constraints

constraints: bool = False

Export supported constraints.

FBX support the following constraints:

  • Point
  • Aim
  • Orient
  • Parent
  • IK handle (including Pole vector)

Export your constraints effectively without the need to bake the animation first, if you are transferring to a package that which supports these constraints, like MotionBuilder.

Mel Command: FBXExportConstraints.

Note

If you export your scene with the intention of importing it into a package that does not support these constraints (such as 3ds Max), bake the animation first. See bake_complex_animation and bake_resample_all for more information.

convert_nurbs_surface_as

convert_nurbs_surface_as: NurbsSurfaceAs = NurbsSurfaceAs.NURBS

Convert NURBS geometry into a mesh during the export process.

Use this option if you are exporting to a software that does not support NURBS.

convert_to_null

convert_to_null: bool = False

Convert all geometry into locators (dummy objects).

This option is often used for animation only files. It creates a smaller file size, and is supported by FBX Importer when you import it into the original scene.

  • If you import the file into the original scene, the plug-in only imports animation onto the original geometries, and does not add incoming Nulls to the existing scene.
  • If you import the file into a new scene, the plug-in imports the Nulls with the animation applied.

Mel Command: FBXExportAnimationOnly.

curve_filter

curve_filter: bool = False

Apply filters to animation curves during the export process.

deformation

deformation: bool = True

Export Skin and Blend Shape deformations.

You can choose to export Skins and Bend Shapes specifically with deformation_skins and deformation_shapes.

deformation_shapes

deformation_shapes: bool = True

Export Blend Shapes.

Require deformation.

Mel Command: FBXExportShapes.

deformation_skins

deformation_skins: bool = True

Export skin deformation.

Require deformation.

Mel Command: FBXExportSkins.

delete_original_take_on_split_animation

delete_original_take_on_split_animation: bool = False

Remove the default Take 001 when exporting takes.

embed_media

embed_media: bool = False

Include (embed) media (textures, for example) within the FBX file.

Embed your media to ensure that all your textures are carried over and loaded when you open the FBX file on another computer.

Warning

Since this media is contained within the FBX file itself, this has an impact on file size. Therefore, use this option only when you transport an FBX file to a location where the original media source is no longer accessible by the receiver.

When you import an FBX file with embedded media, the embedded files extract to a <fileName>.fbm folder in the same location as the FBX file.

If you do not have write permission to create that new folder, the media files are Imported to the user's temp folder, such as C:\Documents and Settings\<username>\Local Settings\Temp.

If disabled, the Maya FBX plug-in stores the relative and absolute paths of the associated media files at export time. This causes problems if, for some reason, the path is no longer accessible. Make sure that the associated media is accessible to ensure the proper import of these media files.

Mel Command: FBXExportEmbeddedTextures.

file_format

file_format: FileFormat = FileFormat.BINARY

Save file in Binary or ASCII.

Mel Command: FBXExportInAscii, which is a bool.

file_version

file_version: str = FileVersion.current_value

Specify an FBX version to use for export.

Change this option when you want to import your file using an older plug-in version, where the source and destination plug-in versions do not match.

Default to plugin value.

If your version is missing from FileVersion, set the value as a str.

Mel Command: FBXExportFileVersion.

generate_log

generate_log: bool = True

Generate log data.

The Maya FBX plug-in stores log files with the FBX presets, in C:\My Documents\Maya\FBX\Logs.

Mel Command: FBXExportGenerateLog.

hard_edges

hard_edges: bool = False

Split geometry vertex normals based on edge continuity.

Vertex normals determine the visual smoothing between polygon faces. They reflect how Maya renders the polygons in smooth shaded mode.

Note

This operation duplicates vertex information and converts the geometry. Use is to keep the same hard/soft edge look that you get from Maya in MotionBuilder.

Warning

Using this option alters UV maps applied to geometry permanently. The UVs are then properly reassigned to the newly split geometry. When you import this geometry into an empty Maya scene, there is a UV limitation where using Combine per-vertex Normals in the FBX Importer might result in incorrect UV assignments.

Mel Command: FBXExportHardEdges.

include_children

include_children: bool = True

Include the hierarchy below the selected objects when exporting selection.

The selection parameter of export_fbx must be True.

Mel Command: FBXExportIncludeChildren.

input_connections

input_connections: bool = True

Include all related input connections when exporting selection.

The selection parameter of export_fbx must be True.

Mel Command: FBXExportInputConnections.

lights

lights: bool = True

Export lights.

The Maya FBX plug-in exports and converts light types to ensure interoperability.

FBX supports Point, Spot and Directional lights types.

Mel Command: FBXExportLights.

pivot_to_nulls

pivot_to_nulls: bool = False

point_cache

point_cache: bool = False

Create a geometry cache file of a chosen selection set.

To use this option, create a selection set of the objects for which you want to retain the vertex animation. You must apply the set to the Objects Transform node and not the Shape node. By default, any Geometry cache files created are in .MCX format.

When you activate this option, three files (FBX, XML and MCX) are generated.

The Maya FBX plug-in stores the XML and MCX files in a subfolder named after the FBX file and has the suffix _fpc.

Use selection_set_name_as_point_cache to select an appropriate set to export.

Mel Command: FBXExportCacheFile.

preserve_instances

preserve_instances: bool = False

Preserve Maya instances in the FBX export.

If you disable this option, instances are converted to objects.

Note

The Maya FBX plug-in does not support the duplication of input connections. The use of Instances is supported but duplicating the inputs is not.

Mel Command: FBXExportInstances.

quaternion_interpolation

How to export quaternion interpolations from the host application.

Requires animation.

Mel Command: FBXExportQuaternion.

referenced_asset_content

referenced_asset_content: bool = True

Export referenced Asset, along with its contents.

In other words, containers are exported with any data associated with them. If you activate this option, your references instead become objects in the exported FBX file.

  • You can only use this option when you export an FBX file. If you import this file back into Maya, the contents of your asset are imported as well. Disable this option and the content of the referenced asset is not exported.
  • FBX does not support Assets with transform.
  • Custom attributes on asset nodes are not included when exporting to FBX.

Mel Command: FBXExportReferencedContainersContent in Maya < 2014, FBXExportReferencedAssetsContent in Maya 2014+.

remove_single_key

remove_single_key: bool = False

Removes keys from objects on export if the animation has only one key.

When two or more keys exist in the file, the keys are exported.

Requires animation.

Note

Sometimes, even though objects in a file contain no animation, they have a single key assigned to them for use as a locator. If you do not need these single keys in your file, you can reduce the file size by activating this option to discard them.

selection_set

selection_set: bool = False

Include Selection Sets.

Because including Selection Sets can potentially increase the file size, this option is disabled by default.

selection_set_name_as_point_cache

selection_set_name_as_point_cache: str = ' '

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.

Requires point_cache.

Mel Command: FBXExportQuickSelectSetAsCache.

show_warning_ui

show_warning_ui: bool = True

Show the Warning Manager dialog if something unexpected occurs during the export.

skeleton_definition

skeleton_definition: bool = False

Include Skeleton definitions (FBIK/HumanIK).

Useful if you are transferring to MotionBuilder, which also support Characters.

Mel Command: FBXExportCharacter in Maya < 2013, FBXExportSkeletonDefinitions in Maya 2013+.

smooth_mesh

smooth_mesh: bool = True

Export source mesh with Smooth mesh attributes.

To export the source mesh, disable the Smooth mesh Preview attribute in Maya.

  • If enabled, the mesh is not tessellated, and the source is exported with Smooth Mesh data.
  • If disabled, the mesh is tessellated and exported without Smooth Mesh data.

Note

If you export a Smooth Mesh Preview from Maya with the FBX Exporter Smooth Mesh option disabled, it will not affect the mesh in the scene. Instead your result is a tessellated mesh in the file, but with the original source mesh unaffected/unchanged in the Maya scene.

Mel Command: FBXExportSmoothMesh.

smoothing_groups

smoothing_groups: bool = False

Converts edge information to Smoothing Groups and export them with the file.

Mel Command: FBXExportSmoothingGroups.

tangents

tangents: bool = False

Create tangents and binormals data from UV and Normal information of meshes.

  • Your geometry must have UV information.
  • There is a known FBX limitation where exported binormal and/or tangent information does not appear, even if you activate this option.
  • This option only works on meshes that have only triangle polygons, so you may need to triangulate the mesh.

Mel Command: FBXExportTangents.

triangulate

triangulate: bool = False

Tessellates exported polygon geometry.

This option affects Polygon Meshes, not NURBS.

Mel Command: FBXExportTriangulate.

up_axis

Up axis conversion.

Default to the the Scene Up Axis as set in Window > Settings/Preferences > Preferences > Settings.

  • Only applies axis conversion to the root elements of the scene.
  • If you have animation on a root object that must be converted on export, these animation curves are resampled to apply the proper axis conversion.
  • To avoid resampling these animation curves, make sure to add a Root Node (dummy object) as a parent of the animated object in your scene, before you export to FBX.

Mel Command: FBXExportUpAxis.

use_scene_name

use_scene_name: bool = False

Save the scene animation using the scene name as take name.

Requires animation.

If False, the plug-in saves Maya scene animation as Take 001.

Mel Command: FBXExportUseSceneName.

__iter__

__iter__() -> Iterator[tuple[FbxProperty[Any], object]]

from_scene

from_scene() -> Self

Initialize a new instance from scene values.

FbxImportOptions

FbxImportOptions(**kwargs: object)

Wrapper for FBXProperty Import|* and FBXImport* mel commands.

The fields documentation are from the official Maya documentation for FBX Import MEL commands and FBX Import options

animation

animation: bool = True

Import animation.

audio

audio: bool = True

Import audio.

automatic_units

automatic_units: bool = True

Automatically identify and convert units of the incoming file to match the units of the scene.

  • This conversion affects only incoming data.
  • This does not change the settings in Maya.

axis_conversion

axis_conversion: bool = False

Enable axis conversion on import.

Mel Command: FBXImportAxisConversionEnable.

bake_animation_layers

bake_animation_layers: bool = True

Bake (plot) animation layers contained in the incoming file.

If you disable this option, all the layers in the FBX file will be imported.

Mel Command: FBXImportMergeAnimationLayers.

blind_data

blind_data: bool = True

Import Blind Data stored on polygons.

Blind data is information stored with polygons which is not used by Maya, but might be useful to the platform to which you export to.

See FbxExportOptions.blind_data for more information.

cameras

cameras: bool = True

Import cameras.

Mel Command: FBXImportCameras.

constraints

constraints: bool = True

Import supported constraints contained in the FBX file to Maya.

FBX support the following constraints:

  • Point
  • Aim
  • Orient
  • Parent,
  • IK handle (including Pole vector)

Mel Command: FBXImportConstraints.

curve_filter

curve_filter: bool = False

custom_sampling_rate

custom_sampling_rate: float = 30.0

Custom rate to resample keyframes data.

Only evaluated if [sampling_rate][mayafbx.FbxExportOptions.sampling_rate] is SamplingRate.CUSTOM.

deformation

deformation: bool = True

Import Skin and Blend Shape deformatons.

deformation_normalize_weights

deformation_normalize_weights: bool = False

Normalize weight assignment.

Pre-Normalize weights to ensure that every vertex on a skinned mesh has a weight no less than a total of 1.0.

You can have many joints that influence a single vertex, however, the percentage of each deforming joint always equals a sum total of 1.0.

Requires deformation.

deformation_shapes

deformation_shapes: bool = True

Import Blend Shapes.

Requires deformation.

Mel Command: FBXImportShapes.

deformaton_skins

deformaton_skins: bool = True

Import Skinning.

Requires deformation.

Mel Command: FBXImportSkins.

deforming_elements_to_joint

deforming_elements_to_joint: bool = True

Convert deforming elements into Maya joints.

If False, elements other than joints being used to deform are converted to locators.

Note

This option was originally provided because Maya did not support locator elements (transform nodes that are not joints) within a bone hierarchy. While Maya now supports this, in some cases this option improves the skinning behavior.

fill_timeline

fill_timeline: bool = False

Update the application timeline by the animation range in the incoming FBX file.

Mel Command: FBXImportFillTimeline.

forced_file_axis

forced_file_axis: str = ForcedFileAxis.DISABLED

Force the FBX plug-in to consider the data in the file as if it is natively generated with the specified axis.

Mel Command: FBXImportForcedFileAxis.

generate_log

generate_log: bool = True

Generate log data.

The Maya FBX plug-in stores log files with the FBX presets, in C:\My Documents\Maya\FBX\Logs.

Mel Command: FBXImportGenerateLog.

hard_edges

hard_edges: bool = False

Combine geometry vertex Normals.

Merges back all vertices located at the same exact position as a unique vertex. The Maya FBX plug-in then determines if the edges connected to each vertex are hard edges or smooth edges, based on their normals.

Use this when FbxExportOptions.hard_edges was set to True on export.

  • Using this option permanently alters any UV maps applied to geometry.
  • The plug-in properly re-assigns the UVs to the newly split geometry.
  • There is a limitation in regards to UVs, when importing this geometry into an empty Maya scene, as it may result in incorrect UV assignments.

Mel Command: FBXImportHardEdges.

keep_attributes_locked

keep_attributes_locked: bool = False

Unlock channels in Maya that contain animation in incoming FBX.

Use when you import an FBX file that contains animation onto an object that has locked channels.

lights

lights: bool = True

bool: Import lights.

FBX supports Point, Spot and Directional lights types.

Mel Command: FBXImportLights.

merge_mode

merge_mode: MergeMode = MergeMode.MERGE

How to import the content of your file into the host application.

Mel Command: FBXImportMode.

optical_markers

optical_markers: bool = False

Import optical markers contained in the file as dummy objects.

If disabled, the import process ignores this data.

Optical markers normally come from motion capture data, as a cloud of animated points or markers. The Maya FBX plug-in does not import the animation as the data type is incompatible. However, the Maya FBX plug-in converts optical data into a cloud of static null objects in Maya.

Note

If your optical data originates from MotionBuilder, you can set the state of all optical markers to Done in MotionBuilder which lets you import the animation data as curves in Maya.

point_cache

point_cache: bool = True

Import FBX-exported geometry cache data during the FBX import process.

The Maya FBX plug-in generates three files when you export Geometry cache files using FBX: an FBX, XML and MCX file.

The plug-in stores XML and MCX files in a subfolder named after the FBX file and has the suffix FPC (_fpc).

Mel Command: FBXImportCacheFile.

protect_driven_keys

protect_driven_keys: bool = False

Prevent any incoming animation from overwriting channels with driven keys.

Maya has special driven keys that link one attribute value to another object attribute. These keys are exclusive to Maya and are not supported by FBX. When this option is active, the Maya FBX plug-in prevents the disconnection or overwrite of attributes that use driven keys.

  • If True, the driven keys are protected and no incoming animation is applied to the driven channels.
  • If False, the driven keys are discarded and the incoming animation is applied to the driven channels.

Mel Command: FBXImportProtectDrivenKeys.

quaternion_interpolation

quaternion_interpolation: str = QuaternionInterpolation.RESAMPLE_AS_EULER

Convert and resample quaternion interpolation into Euler curves.

Compensates differences between Maya and MotionBuilder quaternions.

Mel Command: FBXImportQuaternion.

remove_bad_polys

remove_bad_polys: bool = True

Remove degenerate polygons from the mesh object.

Remove two-sided polygons, single vertex polygons, and so on.

sampling_rate

sampling_rate: SamplingRate = SamplingRate.SCENE

The source used by the plugin to resample keyframes data.

Mel Command: FBXImportResamplingRateSource

scale_factor

scale_factor: float = 1.0

Scale Factor applied to the entire incoming scene.

The Maya FBX plug-in compares the units used in the host application with the units used in the file imported to determine the Scale Factor value. The plug-in then proposes a unit conversion that matches the system units in the host application. The Scale Factor is the result of this calculation.

For example, if you import a scene from software that used centimeters as the working units to software that uses feet as units, the Scale Factor will be 2.54.

A Scale Factor is 1.0 does not apply a scale conversion.

Only evaluated if automatic_units is False.

The helper function mayafbx.get_scale_factor may be used to calculate the scale factor.

set_maya_framerate

set_maya_framerate: bool = False

Overwrite Maya frame rate with incoming FBX frame rate.

Mel Command: FBXImportSetMayaFrameRate.

show_warning_ui

show_warning_ui: bool = True

Show the Warning Manager dialog if something unexpected occurs during import.

skeleton_definition

Select the Skeleton definition to use on import.

Useful if you are importing from MotionBuilder, which supports characters.

Mel Command: FBXImportSkeletonType.

smoothing_groups

smoothing_groups: bool = False

Import Smoothing Groups.

Added in Maya 2024.

FBX polygon objects with smooth edge normals will reimport into Maya with incorrect normal information unless you activate FbxExportOptions.smoothing_groups on export, and this option on import.

unlock_normals

unlock_normals: bool = False

Recomputes the normals on the objects using Maya internal algorithms.

  • Normals are automatically unlocked for all deformed geometry imported into Maya.
  • Locked normals can create shading issues for geometry if a deformer is applied after import. Unlocking geometry normals resolves this.

Mel Command: FBXImportUnlockNormals.

up_axis

up_axis: str = UpAxis.from_scene

Up axis conversion.

Default to the the scene up axis, as set in Window > Settings/Preferences > Preferences > Settings.

Only evaluated if axis_conversion is True.

  • Only applies axis conversion to the root elements of the incoming scene.
  • If you have animation on a root object that must be converted on import, these animation curves are resampled to apply the proper axis conversion.

Mel Command: FBXImportUpAxis.

update_pivots_from_nulls

update_pivots_from_nulls: bool = True

Assign the rotation transformation of the null (or joints) elements in the hierarchy that are used as pre- and post-rotation to the joint orient and the rotate axis of the original node.

The look-up is done by name as the pre-rotation node's name contains the __Pre_ suffix, while the post-rotation node's name has a __Post_ suffix.

Activate this option when you import older (pre-MotionBuilder 5.5) FBX files that contain an animated joint hierarchy, for example, an animated character.

Note

When [merge_mode][FbxImportOptions.merge_mode] is set to MergeMode.UPDATE_ANIMATION or MergeMode.MERGE this option is automatically set to True.

Mel Command: FBXImportMergeBackNullPivots

__iter__

__iter__() -> Iterator[tuple[FbxProperty[Any], object]]

from_scene

from_scene() -> Self

Initialize a new instance from scene values.

FileFormat

Supported export file formats.

ASCII

ASCII = 'ASCII'

Plain text format.

BINARY

BINARY = 'Binary'

Standard format.

FileVersion

Supported file version.

FBX_2006

FBX_2006 = 'FBX200611'

FBX_2009

FBX_2009 = 'FBX200900'

FBX_2010

FBX_2010 = 'FBX201000'

FBX_2011

FBX_2011 = 'FBX201100'

FBX_2012

FBX_2012 = 'FBX201200'

FBX_2013

FBX_2013 = 'FBX201300'

FBX_2014

FBX_2014 = 'FBX201400'

FBX_2016

FBX_2016 = 'FBX201600'

FBX_2018

FBX_2018 = 'FBX201800'

FBX_2019

FBX_2019 = 'FBX201900'

FBX_2020

FBX_2020 = 'FBX202000'

current_value

current_value() -> str

Export version currently used by the plugin.

ForcedFileAxis

Supported policies for incoming file axis.

DISABLED

DISABLED = 'disabled'

Y

Y = 'y'

Z

Z = 'z'

MergeMode

How to process imported data.

For information on how the plugin handle naming conflict, see FBX plug-in renaming strategy.

ADD

ADD = 'add'

Adds the content of the FBX file to your scene.

  • Add non-existing elements to your scene.
  • If elements exist in your scene, they are duplicated.

MERGE

MERGE = 'merge'

Adds new content and updates animation from your file to matching objects in your scene.

  • Any node without equivalent in the scene is created.
  • Nodes with the same name but not of the same type are replaced.
  • Nodes with the same name and type only have their animation replaced.

If there is animation on any object in the FBX file and the object name is identical to an object in the destination application, that animation is replaced.

If the object with the same name does not have animation, the new animation is added.

UPDATE_ANIMATION

UPDATE_ANIMATION = 'exmerge'

Adds the content of the FBX file to your scene but only updates existing animation.

  • Nodes of the same name and type have only their animation curve replaced.
  • Any objects in the file that are not already in the scene are ignored.

UPDATE_ANIMATION_KEYED_TRANSFORMS

UPDATE_ANIMATION_KEYED_TRANSFORMS = 'exmergekeyedxforms'

Existing un-keyed transforms on existing scene elements are not overwritten.

Instead, they are preserved in their current state. Only Keyed animation from the imported file updates the transforms on open elements in scene.

Warning

If you intend to exclusively-merge hierarchies containing animation data, the new animation is ignored on unkeyed import transforms that are identically named. If identically-named transforms have keys, existing import behavior is maintained.

NurbsSurfaceAs

Supported nurbs surfaces conversions on export.

INTERACTIVE_DISPLAY_MESH

INTERACTIVE_DISPLAY_MESH = 'Interactive Display Mesh'

Converts geometry based on the NURBS display settings.

NURBS

NURBS = 'NURBS'

No conversion applied, NURBS geometry is exported as NURBS.

SOFTWARE_RENDER_MESH

SOFTWARE_RENDER_MESH = 'Software Render Mesh'

Converts geometry based on the NURBS render settings.

QuaternionInterpolation

How to handle quaternion interpolation on import/export.

RESAMPLE_AS_EULER

RESAMPLE_AS_EULER = 'Resample As Euler Interpolation'

Converts and resamples quaternion interpolations into Euler curves.

Use this option to obtain visual results identical to your animation in MotionBuilder or other applications.

RETAIN_QUATERNION

RETAIN_QUATERNION = 'Retain Quaternion Interpolation'

Retains quaternion interpolation types during the export process.

Use this option when you export animation that has quaternion interpolations.

  • This option is only compatible with applications supporting this interpolation type, such as Autodesk MotionBuilder.
  • The resulting animation will not be identical since quaternion evaluations are different in Maya and MotionBuilder.

SET_AS_EULER

SET_AS_EULER = 'Set As Euler Interpolation'

Changes the interpolation type of quaternion keys to a Euler type, without resampling the animation curves themselves.

  • Using this option results in the same number of keys, set as Euler types.
  • The visual result will be different since it is now evaluated as a Euler interpolation.

SamplingRate

Sampling rate sources.

CUSTOM

CUSTOM = 'Custom'

Use a custom value to resample animation.

FILE

FILE = 'File'

Use the sampling rate defined by the FBX file to resample animation.

SCENE

SCENE = 'Scene'

Use scene current working units to resample animation.

SkeletonDefinition

Skeleton definition that can be used on import.

The FBXProperty command does not support FullBody IK

Note

The command FBXImportSkeletonType also support FullBody Ik but running the command raise Cannot find procedure "FBXImportSkeletonType".

HUMAN_IK

HUMAN_IK = 'HumanIK'

Import Human IK Skeleton definitions.

NONE

NONE = 'None'

Do not import Skeleton definitions.

Take

FBX take description.

end

end: int

End frame.

name

name: str

Take name.

start

start: int

Start frame.

UpAxis

Supported Up Axis conversions.

Y

Y = 'Y'

Z

Z = 'Z'

from_scene

from_scene() -> UpAxis

Scene up axis.

export_fbx

export_fbx(
    filename: os.PathLike[str],
    options: FbxExportOptions,
    *,
    selection: bool = False,
    takes: list[Take] | None = None
) -> None

Export to specified filename using options.

Parameters:

  • filename (os.PathLike[str]) –

    Destination .fbx file.

  • options (FbxExportOptions) –

    Export options.

  • selection (bool, default: False ) –

    Export only selected elements. Default to False, which export the whole scene.

  • takes (list[Take] | None, default: None ) –

    An optional list of animation Take to export.

Raises:

  • RuntimeError

    If selection is True but nothing is selected.

get_scale_factor

get_scale_factor(
    to: Literal["mm", "cm", "m", "km", "in", "ft", "yd", "mi"],
    from_: Literal["mm", "cm", "m", "km", "in", "ft", "yd", "mi"] = "cm",
) -> float

Returns scale factor, calculate from_ unit as to unit.

Utility for FbxImportOptions.scale_factor.

import_fbx

import_fbx(
    filename: os.PathLike[str],
    options: FbxImportOptions,
    *,
    take: int | None = None
) -> None

Import filename using options.

Parameters:

  • filename (os.PathLike[str]) –

    Path to a .fbx file.

  • options (FbxImportOptions) –

    Import options.

  • take (int | None, default: None ) –

    Specify the appropriate take number to load the corresponding take. If you specify 0, the plugin imports no animation. If you specify -1, the plugin retrieves the last take in the take array. The plugin considers any number of takes greater than the amount of takes contained in the file or any negative value less than -1 to be invalid.

restore_export_preset

restore_export_preset() -> None

Restores the default values of the FBX Exporter.

Values are restored by loading the "Autodesk Media & Entertainment" export preset.

restore_import_preset

restore_import_preset() -> None

Restores the default values of the FBX Importer.

Values are restored by loading the "Autodesk Media & Entertainment" import preset.