Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-07-09 20:58:48 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-07-09 20:58:56 +0400
commitb617d6d5e6604cb259740e486bf1ac6c07cf42d9 (patch)
tree0e4491dfc2e9709ae50e54918619ab2e8c510fa8 /source/blender/editors/transform/transform_generics.c
parent5b0e4cd8c99e500baee0d951f4819b68c9215cd9 (diff)
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.
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r--source/blender/editors/transform/transform_generics.c9
1 files changed, 6 insertions, 3 deletions
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) {