trigger.library.fbx
Module for FBX file format operations.
Attributes
Functions
|
Load FBX file. |
Reset import settings to default |
|
Reset import settings to default |
|
|
Save the current scene to a FBX file. |
Module Contents
- load(file_path, merge_mode='merge', namespace=None, smoothing_groups=False, unlock_normals=False, combine_per_vertex_normals=False, animation=True, take=-1, fill_timeline=False, bake_animation_layers=True, optical_markers=False, quaternion_interpolation_mode='resample', protect_driven_keys=False, deform_elements_to_joints=True, update_pivots_from_nulls=True, geometry_cache=True, deformed_models=True, skins=True, blend_shapes=True, pre_normalize_weights=False, constraints=True, skeleton_definition_as='HumanIK', cameras=True, lights=True, audio=True, automatic_scale_factor=True, file_units_converted_to='Centimeters', show_warnings_manager=False, generate_log_data=False, remove_bad_polygons=True, blind_data=False, curve_filter=False, sampling_rate_selector='Scene', curve_filter_sampling_rate=24, axis_conversion=False, up_axis='Y')
Load FBX file. Args:
file_path (str): Path to FBX file merge_mode (str): Merge mode.
add: Adds the content of the FBX file to the scene. merge: Adds new content and updates animation for existing content. exmerge: updates existing animation and poses. No new content is added. exmergekeyedxforms: only updates keyed animation. Defaults to merge.
namespace (str): Namespace. If defined, the namespace will be added to the imported objects. defaults to None. smoothing_groups (bool): Import smoothing groups. Defaults to False. unlock_normals (bool): Unlock normals. Defaults to False. combine_per_vertex_normals (bool): Import hard edges. Defaults to False. blind_data (bool): Import blind data. Defaults to True. animation (bool): Import animation. Defaults to True. take (int): Take index. -1 for latest. 0 No animation. Defaults to -1. fill_timeline (bool): Fills the scene timeline on import (instead of using the Maya default). Defaults to False. bake_animation_layers (bool): Activate Bake animation layers to bake (or Plot) animation layers contained in
the incoming file. Defaults to True.
optical_markers (bool): Import markers. Defaults to False. quaternion_interpolation_mode (str): Specifies how to handle quaternion imports. Options are:
resample: Resample as Euler interpolation. euler: Set as Euler interpolation. quaternion: Retain quaternion interpolation. Defaults to resample.
protect_driven_keys (bool): Protect driven keys. Defaults to False. deform_elements_to_joints (bool): Activate this option to convert deforming elements into Maya joints.
If this option is not active, all elements other than joints being used to deform are converted to locators. Defaults to True.
- update_pivots_from_nulls (bool): Activate this option only when you import older (pre-MotionBuilder 5.5) FBX files that
contain an animated joint hierarchy, for example, an animated character. This option lets you 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 pre-rotation and post-rotation nodes are then deleted. Older files created with the Export Pre/Post Rotation as Nulls option are merged back to the original Maya setup. Defaults to True.
- geometry_cache (bool): Activate this option to import FBX-exported geometry cache data during the FBX import
process. Defaults to True.
- deformed_models (bool): Activate this option to import FBX-exported deformation data during the FBX import process.
Defaults to True.
- skins (bool): Activate this option to import FBX-exported skin data during the FBX import process.
Defaults to True.
blend_shapes (bool): Activate this option to import all geometry Blend Shapes into your scene. Defaults to True. pre_normalize_weights (bool): Activate this option to normalize weight assignment. Defaults to False. constraints (bool): Activate this option to import FBX-exported constraint data during the FBX import process.
Defaults to True.
- skeleton_definition_as (str): Specifies the character type. Options are:
None: No character type. HumanIK: HumanIK character type. Defaults to HumanIK.
cameras (bool): import FBX-exported camera data during the FBX import process. Defaults to True. lights (bool): import FBX-exported light data during the FBX import process. Defaults to True. audio (bool): import FBX-exported audio data during the FBX import process. Defaults to True. automatic_scale_factor (bool): Activate this option to convert the scale of the incoming FBX file to the
current scene’s units. Defaults to True.
- file_units_converted_to (str): Specifies the units for the incoming FBX file. Options are:
Centimeters: Centimeters. Meters: Meters. Millimeters: Millimeters. Kilometers: Kilometers. Inches: Inches. Feet: Feet. Yards: Yards. Miles: Miles. Defaults to Centimeters.
- axis_conversion (bool): Activate this option to convert the axis of the incoming FBX file to the current scene’s
axis. Defaults to False.
- up_axis (str): Specifies the up axis for the incoming FBX file. Options are:
Y: Y. Z: Z.
show_warnings_manager (bool): Option to show the warnings manager. Defaults to False. generate_log_data (bool): Option to generate log data. Defaults to False. remove_bad_polygons (bool): Option to remove bad polygons from mesh. Defaults to True. sampling_rate_selector (str): Specifies the sampling rate for animation curves. Options are:
Scene: Use the scene’s current sampling rate. File: Use the sampling rate specified in the FBX file. Custom: Use the sampling rate specified in the Curve Filter Sampling Rate field. Defaults to Scene.
curve_filter_sampling_rate (float): Specifies the sampling rate for animation curves. Defaults to 24.0. curve_filter (bool): Activate this option to filter animation curves. Defaults to False.
- Returns:
Imported nodes.
- reset_export_settings()
Reset import settings to default
- reset_import_settings()
Reset import settings to default
- save(file_path, force=False, selection_only=False, smoothing_groups=False, split_per_vertex_normals=False, tangents_and_binormals=False, smooth_mesh=True, selection_sets=False, convert_to_null_objects=False, preserve_instances=False, referenced_assets_content=True, triangulate=False, convert_nurbs_surface_to='nurbs', animation=True, use_scene_name=False, remove_single_key=False, quaternion_interpolation_mode='resample', bake_animation=False, bake_start=0, bake_end=200, bake_step=1, bake_resample_all=False, hide_complex_animation_warning=True, deformed_models=True, skins=True, blend_shapes=True, shape_attributes=False, attribute_values='Relative', curve_filters=False, constant_key_reducer=False, translation_precision=0.0001, rotation_precision=0.009, scaling_precision=0.004, other_precision=0.009, auto_tangents_only=True, geometry_cache=False, geometry_cache_set=' ', constraints=False, skeleton_definitions=False, cameras=True, lights=True, audio=True, embed_media=False, include_children=True, input_connections=True, automatic_scale_factor=True, file_units_converted_to='Centimeters', up_axis='Y', show_warning_manager=False, generate_log_data=False, animation_only=False, blind_data=True, bind_pose=True, bypass_rss_inheritance=False)
Save the current scene to a FBX file. Args:
file_path (str): The path to the FBX file to save. force (bool): Force save. Defaults to False. selection_only (bool): Export only the selected objects. Defaults to False. smoothing_groups (bool): Export smoothing groups. Defaults to False. split_per_vertex_normals (bool): Split per vertex normals. Defaults to False. tangents_and_binormals (bool): Export tangents and binormals. Defaults to False. smooth_mesh (bool): Smooth mesh. Defaults to True. selection_sets (bool): Export selection sets. Defaults to False. convert_to_null_objects (bool): Convert to null objects. Defaults to False. preserve_instances (bool): Preserve instances. Defaults to False. referenced_assets_content (bool): Export referenced assets content. Defaults to True. triangulate (bool): Triangulate. Defaults to False. convert_nurbs_surface_to (str): Convert NURBS surface to. Options are:
“nurbs”: “NURBS”. “display”: “Interactive Display Mesh”. “render”: “Software Render Mesh”. Defaults to “nurbs”.
animation (bool): Export animation. Defaults to True. use_scene_name (bool): Use scene name. Defaults to False. remove_single_key (bool): Remove single key. Defaults to False. quaternion_interpolation_mode (str): Specifies the interpolation mode for quaternion curves. Options are:
“resample”: “Resample As Euler Interpolation”. “euler”: “Set As Euler Interpolation”. “quaternion”: “Retain Quaternion Interpolation”. Defaults to “resample”.
bake_animation (bool): Bake animation. Defaults to False. bake_start (int): Specifies the start frame for baking animation. Defaults to 0. bake_end (int): Specifies the end frame for baking animation. Defaults to 200. bake_step (int): Specifies the step frame for baking animation. Defaults to 1. bake_resample_all (bool): Resample all. Defaults to False. hide_complex_animation_warning (bool): Hide complex animation warning. Defaults to True. deformed_models (bool): Export deformed models. Defaults to True. skins (bool): Export skins. Defaults to True. blend_shapes (bool): Export blend shapes. Defaults to True. shape_attributes (bool): Export shape attributes. Defaults to False. attribute_values (str): Specifies the attribute values to export. Options are:
“Relative”: “Relative”. “Absolute”: “Absolute”. Defaults to “Relative”.
curve_filters (bool): Export curve filters. Defaults to False. constant_key_reducer (bool): Export constant key reducer. Defaults to False. translation_precision (float): Specifies the translation precision. Defaults to 0.0001. rotation_precision (float): Specifies the rotation precision. Defaults to 0.009. scaling_precision (float): Specifies the scaling precision. Defaults to 0.004. other_precision (float): Specifies the other precision. Defaults to 0.009. auto_tangents_only (bool): Export auto tangents only. Defaults to True. geometry_cache (bool): Export geometry cache. Defaults to False. geometry_cache_set (str): Specifies the geometry cache set. Defaults to ” “. constraints (bool): Export constraints. Defaults to False. skeleton_definitions (bool): Export skeleton definitions. Defaults to False. cameras (bool): Export cameras. Defaults to True. lights (bool): Export lights. Defaults to True. audio (bool): Export audio. Defaults to True. embed_media (bool): Embed media. Defaults to False. include_children (bool): Include children. Defaults to True. input_connections (bool): Export input connections. Defaults to True. automatic_scale_factor (bool): Automatic scale factor. Defaults to True. file_units_converted_to (str): Specifies the file units converted to. Options are:
“Centimeters”: “Centimeters”. “Meters”: “Meters”. “Millimeters”: “Millimeters”. “Kilometers”: “Kilometers”. “Inches”: “Inches”. “Feet”: “Feet”. “Yards”: “Yards”. “Miles”: “Miles”. Defaults to “Centimeters”.
- up_axis (str): Specifies the up axis. Options are:
“Y”: “Y”. “Z”: “Z”. Defaults to “Y”.
show_warning_manager (bool): Show warning manager. Defaults to False. generate_log_data (bool): Generate log data. Defaults to False. animation_only (bool): Export animation only. Defaults to False. blind_data (bool): Export blind data. Defaults to True. bind_pose (bool): Export bind pose. Defaults to True. bypass_rss_inheritance (bool): Bypass RSS inheritance. Defaults to False.
- Returns:
(str) FBX file path
- export_settings
- import_settings