diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-08-05 21:06:23 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-08-05 21:06:23 +0300 |
commit | 854f73b4a2317e026b3d6f8c3598d9bded09337b (patch) | |
tree | d014b406dc4482718551a4b2def95eb7b683404e /source/blender/editors/transform/transform_mode_shear.c | |
parent | d9b72a96b3683dd3fb7c616f880ff8120179ed68 (diff) |
Fix T78592: Shear operator fails to affect curve control point handles
Use `td->iloc` as the coordinates of the transformed element.
It is more accurate and other transformation modes, such as scale, also
operate on `td->iloc`.
Diffstat (limited to 'source/blender/editors/transform/transform_mode_shear.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode_shear.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform_mode_shear.c b/source/blender/editors/transform/transform_mode_shear.c index fa33c1550e7..e508a1fa4c2 100644 --- a/source/blender/editors/transform/transform_mode_shear.c +++ b/source/blender/editors/transform/transform_mode_shear.c @@ -164,7 +164,7 @@ static void applyShear(TransInfo *t, const int UNUSED(mval[2])) FOREACH_TRANS_DATA_CONTAINER (t, tc) { TransData *td = tc->data; for (i = 0; i < tc->data_len; i++, td++) { - const float *center, *co; + const float *center; if (td->flag & TD_SKIP) { continue; } @@ -178,19 +178,15 @@ static void applyShear(TransInfo *t, const int UNUSED(mval[2])) if (is_local_center) { center = td->center; - co = td->loc; } else { center = tc->center_local; - co = td->center; } - sub_v3_v3v3(vec, co, center); - + sub_v3_v3v3(vec, td->iloc, center); mul_m3_v3(tmat, vec); - add_v3_v3(vec, center); - sub_v3_v3(vec, co); + sub_v3_v3(vec, td->iloc); if (t->options & CTX_GPENCIL_STROKES) { /* grease pencil multiframe falloff */ |