[Bf-extensions-cvs] [c01ed44] master: Update Unity preset.

Bastien Montagne noreply at git.blender.org
Fri Jul 4 15:50:11 CEST 2014


Commit: c01ed441f3baa68b41f405c6c99750f209ae7e8f
Author: Bastien Montagne
Date:   Fri Jul 4 15:39:16 2014 +0200
https://developer.blender.org/rBAc01ed441f3baa68b41f405c6c99750f209ae7e8f

Update Unity preset.

Based on patch D629 by jrestemeier (Jens Restemeier), but removed 6.1 settings, no use of that here.

===================================================================

M	io_scene_fbx/export_fbx_bin.py

===================================================================

diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index d39ce94..a7ccc53 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,
     }



More information about the Bf-extensions-cvs mailing list