diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-04 09:49:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-04 09:49:39 +0400 |
commit | 64e3e69bc0135eec1662170594a32dc878c4f327 (patch) | |
tree | d62414c0611f61b8732476db8c452bc6d5097cd0 /io_scene_fbx/export_fbx.py | |
parent | d22e5002f0a798174b8744edfa6acef25cce393e (diff) |
- fix for error in new option disabling default take
- added default options for unity3d, can add other defaults too
Diffstat (limited to 'io_scene_fbx/export_fbx.py')
-rw-r--r-- | io_scene_fbx/export_fbx.py | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index e3cc0e37..67422691 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -204,7 +204,7 @@ def save_single(operator, scene, filepath="", path_mode='AUTO', use_mesh_edges=True, use_rotate_workaround=False, - use_default_take=False, + use_default_take=True, ): import bpy_extras.io_utils @@ -2560,9 +2560,8 @@ Takes: {''') act_end = end else: # use existing name - if blenAction == blenActionDefault: # have we already got the name - take_name = sane_name_mapping_take[blenAction.name] - else: + take_name = sane_name_mapping_take.get(blenAction.name) + if take_name is None: take_name = sane_takename(blenAction) act_start, act_end = blenAction.frame_range @@ -2832,13 +2831,27 @@ Takes: {''') return {'FINISHED'} +# defaults for applications, currently only unity but could add others. +def defaults_unity3d(): + return dict(global_matrix=Matrix.Rotation(-math.pi / 2.0, 4, 'X'), + use_selection=False, + object_types={'ARMATURE', 'EMPTY', 'MESH'}, + use_mesh_modifiers=True, + use_anim=True, + use_anim_optimize=False, + use_anim_action_all=True, + batch_mode='OFF', + use_default_take=True, + ) + + def save(operator, context, - filepath="", - use_selection=True, - batch_mode='OFF', - use_batch_own_dir=False, - **kwargs - ): + filepath="", + use_selection=False, + batch_mode='OFF', + use_batch_own_dir=False, + **kwargs + ): if bpy.ops.object.mode_set.poll(): bpy.ops.object.mode_set(mode='OBJECT') |