Skip to content

Instantly share code, notes, and snippets.

@ssell
Last active July 15, 2022 20:44
Show Gist options
  • Save ssell/d4175e41bbb2b16795596d2702ae3fac to your computer and use it in GitHub Desktop.
Save ssell/d4175e41bbb2b16795596d2702ae3fac to your computer and use it in GitHub Desktop.
Blender to Unity FBX Export Settings
import bpy
op = bpy.context.active_operator
# Save to:
# C:\Program Files\Blender Foundation\Blender {version}\{version}\scripts\presets\operator\export_scene.fbx\
# Example:
# C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\presets\operator\export_scene.fbx\UnityFbxExport.py
op.use_selection = True
op.use_active_collection = False
op.global_scale = 1.0
op.apply_unit_scale = True
op.apply_scale_options = 'FBX_SCALE_UNITS'
op.use_space_transform = True
op.bake_space_transform = True
op.object_types = {'OTHER', 'MESH', 'ARMATURE', 'EMPTY'}
op.use_mesh_modifiers = True
op.use_mesh_modifiers_render = True
op.mesh_smooth_type = 'OFF'
op.use_subsurf = False
op.use_mesh_edges = False
op.use_tspace = False
op.use_custom_props = False
op.add_leaf_bones = True
op.primary_bone_axis = 'Y'
op.secondary_bone_axis = 'X'
op.use_armature_deform_only = False
op.armature_nodetype = 'NULL'
op.bake_anim = False
op.bake_anim_use_all_bones = True
op.bake_anim_use_nla_strips = True
op.bake_anim_use_all_actions = True
op.bake_anim_force_startend_keying = True
op.bake_anim_step = 1.0
op.bake_anim_simplify_factor = 1.0
op.path_mode = 'AUTO'
op.embed_textures = False
op.batch_mode = 'OFF'
op.use_batch_own_dir = True
op.axis_forward = 'Z'
op.axis_up = 'Y'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment