diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-12-22 12:04:21 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-12-22 12:04:21 +0300 |
commit | 0e85d701c6546cc80b7c1f8e089ab34f14095d3a (patch) | |
tree | 265206ffdda952225fe402a09b5083e38e3af8ab /release/scripts/modules | |
parent | 9f34f2b20d558817f800a239896cccf19a926204 (diff) |
Animation: Bake Action, improved discontinuity filter for bones
Perform the same filtering as e5528904f12104ee31e7b67b54f2a4b3f14cec1e
introduced for object rotations, for bone rotations.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy_extras/anim_utils.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py index be6be2b6763..269592b3bb1 100644 --- a/release/scripts/modules/bpy_extras/anim_utils.py +++ b/release/scripts/modules/bpy_extras/anim_utils.py @@ -296,13 +296,10 @@ def bake_action_iter( pbone.keyframe_insert("rotation_axis_angle", index=-1, frame=f, group=name) else: # euler, XYZ, ZXY etc if euler_prev is not None: - euler = pbone.rotation_euler.copy() - euler.make_compatible(euler_prev) + euler = pbone.matrix_basis.to_euler(obj.rotation_mode, euler_prev) pbone.rotation_euler = euler - euler_prev = euler del euler - else: - euler_prev = pbone.rotation_euler.copy() + euler_prev = pbone.rotation_euler.copy() pbone.keyframe_insert("rotation_euler", index=-1, frame=f, group=name) pbone.keyframe_insert("scale", index=-1, frame=f, group=name) |