From c01ed441f3baa68b41f405c6c99750f209ae7e8f Mon Sep 17 00:00:00 2001 From: Bastien Montagne <montagne29@wanadoo.fr> Date: Fri, 4 Jul 2014 15:39:16 +0200 Subject: [PATCH] Update Unity preset. Based on patch D629 by jrestemeier (Jens Restemeier), but removed 6.1 settings, no use of that here. --- io_scene_fbx/export_fbx_bin.py | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index d39ce9467..a7ccc532d 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -2575,18 +2575,36 @@ def save_single(operator, scene, filepath="", # defaults for applications, currently only unity but could add others. def defaults_unity3d(): return { + # These options seem to produce the same result as the old Ascii exporter in Unity3D: + "version": 'BIN7400', + "axis_up": 'Y', + "axis_forward": '-Z', "global_matrix": Matrix.Rotation(-math.pi / 2.0, 4, 'X'), + # Should really be True, but it can cause problems if a model is already in a scene or prefab + # with the old transforms. + "bake_space_transform": False, + "use_selection": False, - "object_types": {'ARMATURE', 'EMPTY', 'MESH'}, + + "object_types": {'ARMATURE', 'EMPTY', 'MESH', 'OTHER'}, "use_mesh_modifiers": True, - #"use_armature_deform_only": True, + "use_mesh_edges": False, + "mesh_smooth_type": 'FACE', + "use_tspace": False, # XXX Why? Unity is expected to support tspace import... + + "use_armature_deform_only": True, + + "use_custom_properties": True, + "bake_anim": True, - #"use_anim_optimize": False, - #"use_anim_action_all": True, + "bake_anim_simplify_factor": 1.0, + "bake_anim_step": 1.0, + "bake_anim_use_nla_strips": True, + "bake_anim_use_all_actions": True, + + "path_mode": 'AUTO', + "embed_textures": False, "batch_mode": 'OFF', - # Should really be True, but it can cause problems if a model is already in a scene or prefab - # with the old transforms. - "bake_space_transform": False, } -- GitLab