diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-12-18 14:50:36 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-12-18 14:50:36 +0300 |
commit | e5528904f12104ee31e7b67b54f2a4b3f14cec1e (patch) | |
tree | 7e806f8e895e7e56bfc0d59c457482761efff4da /release/scripts/modules | |
parent | fe5d2448c6e1348be1f82f10a65d65b992f2477b (diff) |
Fix T83351: Baked object rotation has discontinuities
Fix Euler discontinuities in the Bake Action operator, by explicitly
using the previous Euler angles when converting from matrix to rotation.
This basically follows the same approach as used in e4ca1fc4ea43, although
the Euler Discontinuity Filter also performs single-channel filtering which
the Bake Action operator doesn't.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy_extras/anim_utils.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py index 24812032f9b..fb46c3c19b5 100644 --- a/release/scripts/modules/bpy_extras/anim_utils.py +++ b/release/scripts/modules/bpy_extras/anim_utils.py @@ -346,9 +346,7 @@ def bake_action_iter( obj.keyframe_insert("rotation_axis_angle", index=-1, frame=f, group=name) else: # euler, XYZ, ZXY etc if euler_prev is not None: - euler = obj.rotation_euler.copy() - euler.make_compatible(euler_prev) - obj.rotation_euler = euler + obj.rotation_euler = matrix.to_euler(obj.rotation_mode, euler_prev) euler_prev = euler del euler else: |