diff options
Diffstat (limited to 'io_scene_fbx/export_fbx_bin.py')
-rw-r--r-- | io_scene_fbx/export_fbx_bin.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index 1c43180d..78c2f282 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -2088,8 +2088,14 @@ def fbx_animations(scene_data): ob = ob_obj.bdata # Back to real Blender Object. if not ob.animation_data: continue + + # Some actions are read-only, one cause is being in NLA tweakmode + restore_use_tweak_mode = ob.animation_data.use_tweak_mode + if ob.animation_data.is_property_readonly('action'): + ob.animation_data.use_tweak_mode = False + # We have to remove active action from objects, it overwrites strips actions otherwise... - ob_actions.append((ob, ob.animation_data.action)) + ob_actions.append((ob, ob.animation_data.action, restore_use_tweak_mode)) ob.animation_data.action = None for track in ob.animation_data.nla_tracks: if track.mute: @@ -2110,8 +2116,9 @@ def fbx_animations(scene_data): for strip in strips: strip.mute = False - for ob, ob_act in ob_actions: + for ob, ob_act, restore_use_tweak_mode in ob_actions: ob.animation_data.action = ob_act + ob.animation_data.use_tweak_mode = restore_use_tweak_mode # All actions. if scene_data.settings.bake_anim_use_all_actions: |