diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-03-25 17:32:25 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-03-25 17:36:53 +0300 |
commit | 56df673be271c10200d758e0b0e891750103f8d6 (patch) | |
tree | 677c4abe65f07129ce1b4300e2b5513641c58509 /source/blender/editors/transform/transform_convert_cursor.c | |
parent | a9cd90135afe6e2615ac20ea81c16cb4e0a95534 (diff) |
Fix T86796: moving the cursor in the UV Editor does not take aspect into
account
UV coords are scaled by aspects (see UVsToTransData). This also applies
for the Cursor in the UV Editor which also means that for display and
when the cursor coords are flushed (new 'recalcData_cursor_image' was
added for this), these need to be converted each time.
Maniphest Tasks: T86796
Differential Revision: https://developer.blender.org/D10817
Diffstat (limited to 'source/blender/editors/transform/transform_convert_cursor.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert_cursor.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_convert_cursor.c b/source/blender/editors/transform/transform_convert_cursor.c index e6a972bfc7c..67d85f9610b 100644 --- a/source/blender/editors/transform/transform_convert_cursor.c +++ b/source/blender/editors/transform/transform_convert_cursor.c @@ -56,6 +56,13 @@ void createTransCursor_image(TransInfo *t) } td->flag = TD_SELECTED; + + /* UV coords are scaled by aspects (see UVsToTransData). This also applies for the Cursor in the + * UV Editor which also means that for display and when the cursor coords are flushed + * (recalcData_cursor_image), these are converted each time. */ + cursor_location[0] = cursor_location[0] * t->aspect[0]; + cursor_location[1] = cursor_location[1] * t->aspect[1]; + copy_v3_v3(td->center, cursor_location); td->ob = NULL; |