From 283d76932a74971b8be06a988c2e0646fdbc1b78 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Tue, 14 Jan 2020 15:49:30 +0300 Subject: Fix T57159: don't exit tweak mode in Bake Action if reusing the action. --- release/scripts/modules/bpy_extras/anim_utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'release/scripts/modules') diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py index e402c9cb53c..d5e328f5c51 100644 --- a/release/scripts/modules/bpy_extras/anim_utils.py +++ b/release/scripts/modules/bpy_extras/anim_utils.py @@ -249,11 +249,14 @@ def bake_action_iter( 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 + # Only leave tweak mode if we actually need to modify the action (T57159) + if action != atd.action: + # Leave tweak mode before trying to modify the action (T48397) + if atd.use_tweak_mode: + atd.use_tweak_mode = False + + atd.action = action - atd.action = action # ------------------------------------------------------------------------- # Apply transformations to action -- cgit v1.2.3 From d5c963bbc3da296f7740ef6df563946ed1f98d15 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Tue, 14 Jan 2020 16:04:23 +0300 Subject: Fix T69105: reset the action blend mode to Replace in Bake Action. This can't be done in Tweak mode since the setting is stored in the tweaked strip, and the logic for finding it is not exposed to python. --- release/scripts/modules/bpy_extras/anim_utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/modules') diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py index d5e328f5c51..c67134ac3f6 100644 --- a/release/scripts/modules/bpy_extras/anim_utils.py +++ b/release/scripts/modules/bpy_extras/anim_utils.py @@ -257,6 +257,9 @@ def bake_action_iter( atd.action = action + # Baking the action only makes sense in Replace mode, so force it (T69105) + if not atd.use_tweak_mode: + atd.action_blend_type = 'REPLACE' # ------------------------------------------------------------------------- # Apply transformations to action -- cgit v1.2.3