From 93ec2c94e5afef18563cbefa0d12275ebabb7ff0 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Thu, 6 Jun 2019 15:52:52 +0200 Subject: Fix T64533: Using "X-Axis Mirror" while posing with auto keyframe on does not keyframe the mirrored bone Use an additional pose bone flag so we can keep track of mirrored bones that should be autokeyframed. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D5033 --- source/blender/editors/transform/transform_conversions.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/transform/transform_conversions.c') diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index e766709cdf1..19a61e1daa7 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -812,7 +812,7 @@ static void bone_children_clear_transflag(int mode, short around, ListBase *lb) bone->flag |= BONE_TRANSFORM_CHILD; } else { - bone->flag &= ~BONE_TRANSFORM; + bone->flag &= ~(BONE_TRANSFORM | BONE_TRANSFORM_MIRROR); } bone_children_clear_transflag(mode, around, &bone->childbase); @@ -838,14 +838,14 @@ int count_set_pose_transflags(Object *ob, bone->flag |= BONE_TRANSFORM; } else { - bone->flag &= ~BONE_TRANSFORM; + bone->flag &= ~(BONE_TRANSFORM | BONE_TRANSFORM_MIRROR); } bone->flag &= ~BONE_HINGE_CHILD_TRANSFORM; bone->flag &= ~BONE_TRANSFORM_CHILD; } else { - bone->flag &= ~BONE_TRANSFORM; + bone->flag &= ~(BONE_TRANSFORM | BONE_TRANSFORM_MIRROR); } } @@ -6778,7 +6778,8 @@ void autokeyframe_pose(bContext *C, Scene *scene, Object *ob, int tmode, short t } for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { - if (pchan->bone->flag & BONE_TRANSFORM) { + if (pchan->bone->flag & (BONE_TRANSFORM | BONE_TRANSFORM_MIRROR)) { + ListBase dsources = {NULL, NULL}; /* clear any 'unkeyed' flag it may have */ -- cgit v1.2.3