diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-06-16 22:47:34 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-06-16 22:47:46 +0300 |
commit | 845f4cebadc8d15b6407e2e863fce2de6230266b (patch) | |
tree | 0f1019fa22330f5ae205afb7e8f910fa81c7e562 /source/blender/editors/transform/transform_mode_push_pull.c | |
parent | d03b26edbdc3a9fe87fde44bd8db8c4a67a36757 (diff) |
Fix T88342: 'To Sphere' and 'Push/Pull' not working in Pose mode
Some modes don't take into account that `TransData` may be in data space.
Diffstat (limited to 'source/blender/editors/transform/transform_mode_push_pull.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode_push_pull.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_mode_push_pull.c b/source/blender/editors/transform/transform_mode_push_pull.c index 8a92978f33f..b08e479a3d0 100644 --- a/source/blender/editors/transform/transform_mode_push_pull.c +++ b/source/blender/editors/transform/transform_mode_push_pull.c @@ -77,6 +77,8 @@ static void applyPushPull(TransInfo *t, const int UNUSED(mval[2])) t->con.applyRot(t, NULL, NULL, axis_global, NULL); } + const bool is_data_space = (t->options & CTX_POSE_BONE) != 0; + FOREACH_TRANS_DATA_CONTAINER (t, tc) { TransData *td = tc->data; for (i = 0; i < tc->data_len; i++, td++) { @@ -101,6 +103,9 @@ static void applyPushPull(TransInfo *t, const int UNUSED(mval[2])) } } normalize_v3_length(vec, distance * td->factor); + if (is_data_space) { + mul_m3_v3(td->smtx, vec); + } add_v3_v3v3(td->loc, td->iloc, vec); } |