diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-07-24 04:18:40 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-07-24 04:18:40 +0300 |
commit | f283aa61c5a5f7b0ff9869dc32519806237f8965 (patch) | |
tree | d97168c592e40052946a3e0a73520c4d8f40e1c7 /release/scripts/modules/bpy_extras/anim_utils.py | |
parent | e4efa16b0079a4644380ae5a7dcc607bf692aafc (diff) |
Fix T48397: Can not bake tweaked NLA
We need to leave tweak mode before trying to modifiy the action as doing
so will leave Blender in a semi-corrupted state.
Reviewers: #animation
Reviewed by: aligorith
Maniphest Tasks: T48397
Differential Revision: https://developer.blender.org/D2119
Diffstat (limited to 'release/scripts/modules/bpy_extras/anim_utils.py')
-rw-r--r-- | release/scripts/modules/bpy_extras/anim_utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py index 021a8bbb530..0cc6462e8d1 100644 --- a/release/scripts/modules/bpy_extras/anim_utils.py +++ b/release/scripts/modules/bpy_extras/anim_utils.py @@ -155,6 +155,11 @@ def bake_action(frame_start, atd = obj.animation_data_create() if action is None: action = bpy.data.actions.new("Action") + + # Leave tweak mode before trying to modify the action (T48397) + if atd.use_tweak_mode: + atd.use_tweak_mode = False + atd.action = action # ------------------------------------------------------------------------- |