diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-01 18:34:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-01 18:34:03 +0300 |
commit | 312cb0a957b81233eaf441f5b3a0c8420a6e24e4 (patch) | |
tree | f2244802ed44073d815f68ec73d72079fbaf7b1a | |
parent | ef931fecc31b41d1628deb1f35e4e6e481760d05 (diff) |
Fix T45974: Bones fail to snap to verts
Was an issue with individual-origins + snap
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 687cf2f69e4..3a8fa2a6ca7 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1252,7 +1252,13 @@ static void createTransArmatureVerts(TransInfo *t) else { if (ebo->flag & BONE_TIPSEL) { copy_v3_v3(td->iloc, ebo->tail); - copy_v3_v3(td->center, (t->around == V3D_LOCAL) ? ebo->head : td->iloc); + + /* don't allow single selected tips to have a modified center, + * causes problem with snapping T45974 */ + copy_v3_v3(td->center, + ((t->around == V3D_LOCAL) && + (ebo->flag & BONE_ROOTSEL)) ? ebo->head : td->iloc); + td->loc = ebo->tail; td->flag = TD_SELECTED; if (ebo->flag & BONE_EDITMODE_LOCKED) |