diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-06-11 15:41:18 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-06-11 15:41:18 +0300 |
commit | 3a6f6c87e051edd3e98c92428980a52bafd7abf0 (patch) | |
tree | d0aaba782e20e7f26d3bb31d32a4aa763ab426ee /source/blender/makesrna/intern/rna_armature.c | |
parent | f58b97a45758c828675543335f78bbfc82f67b31 (diff) |
Fix T65671: Armature X-Mirror inconsistencies
Apparently the `rna_Armature_editbone_transform_update` function was incomplete because it didn't copy all mirrored transform values.
I also noticed that the same logic seen in `rna_Armature_editbone_transform_update` is also seen in `ED_armature_edit_transform_mirror_update`.
So the solution is expose and use that logic that updates a mirrored bone. Thus deduplicating and fixing T65671.
Reviewers: brecht, zeddb
Differential Revision: https://developer.blender.org/D5058
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index c470cbeb090..3f4acabec34 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -565,26 +565,7 @@ static void rna_Armature_editbone_transform_update(Main *bmain, Scene *scene, Po } if (arm->flag & ARM_MIRROR_EDIT) { - eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebone); - - if (eboflip) { - eboflip->roll = -ebone->roll; - - eboflip->head[0] = -ebone->head[0]; - eboflip->tail[0] = -ebone->tail[0]; - - /* update our parent */ - if (eboflip->parent && eboflip->flag & BONE_CONNECTED) { - copy_v3_v3(eboflip->parent->tail, eboflip->head); - } - - /* update our children if necessary */ - for (child = arm->edbo->first; child; child = child->next) { - if (child->parent == eboflip && (child->flag & BONE_CONNECTED)) { - copy_v3_v3(child->head, eboflip->tail); - } - } - } + ED_armature_ebone_transform_mirror_update(arm, ebone, false); } rna_Armature_update_data(bmain, scene, ptr); |