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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-12-16 12:14:58 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-12-16 17:03:46 +0300
commit8d590e4b86287be22567d1adf8c6a7946bc7f63d (patch)
tree1ab1b1f3c2b812d4f7e713db5cc7534b94267df2
parent8da62a9a86d98676ff0bc4cffd389dcbed7e3071 (diff)
Fix T83801: UVEditor translation ignores "Pixel Coordinates" and aspect
ratio Caused by rB4eda60c2d82d. T83801 reported not moving in pixel space, but even without that toggle above commit caused the translation to not take apsect ratio into account properly [a translation of 1 on the x axis for example on an image with non 1:1 aspect ration caused the UVs to not end up in the same place on the next 'tile'] Above commit removed 'removeAspectRatio()' [the counterpart of applyAspectRatio -- which does the pixel coord correction internally] from 'applyTranslation()'. This was also reported in T83352 [which was closed by rBf3b08af24c9f -- but that only solved the displax in header, not the actual transformation] Now bring back 'removeAspectRatio()'. Maniphest Tasks: T83801 Differential Revision: https://developer.blender.org/D9869
-rw-r--r--source/blender/editors/transform/transform_mode_translate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c
index 90c1f241338..8597c372537 100644
--- a/source/blender/editors/transform/transform_mode_translate.c
+++ b/source/blender/editors/transform/transform_mode_translate.c
@@ -377,6 +377,9 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2]))
else {
mul_v3_m3v3(global_dir, t->spacemtx, global_dir);
}
+ if (t->flag & T_2D_EDIT) {
+ removeAspectRatio(t, global_dir);
+ }
}
else {
copy_v3_v3(global_dir, t->values);