From b617d6d5e6604cb259740e486bf1ac6c07cf42d9 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Wed, 9 Jul 2014 19:58:48 +0300 Subject: Fix T40991, mirrored armatures not restored properly when cancelling. Issue here is that we force mirroring even if original armature is not mirrored. We could be smart and store only unselected mirrored bones here (since those will get restored from transdata), however not all properties were getting stored and restored; rolling bones still suffered from the bug for instance. To fix this we need to restore all properties that armature mirroring overrides. Transdata obviously does not offer a lot of space here, so I used TransInfo->customdata to store an array of initial parameters of the mirrored bones. --- source/blender/editors/transform/transform_generics.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/transform/transform_generics.c') diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 6eb88212714..15d1bb75d89 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -847,9 +847,12 @@ static void recalcData_objects(TransInfo *t) } } - if (arm->flag & ARM_MIRROR_EDIT) - transform_armature_mirror_update(t->obedit); - + if (arm->flag & ARM_MIRROR_EDIT) { + if (t->state != TRANS_CANCEL) + transform_armature_mirror_update(t->obedit); + else + restoreBones(t); + } } else { if (t->state != TRANS_CANCEL) { -- cgit v1.2.3