diff options
author | Chris Blackbourn <chrisbblend@gmail.com> | 2022-11-01 02:50:16 +0300 |
---|---|---|
committer | Chris Blackbourn <chrisbblend@gmail.com> | 2022-11-01 02:50:16 +0300 |
commit | c3e4fa74044a5a2a38ec28cf66be45c98f982501 (patch) | |
tree | cdc7e6ff3c4eb673f8ab1f01d3dd04d354f4db05 | |
parent | 5016a8687c118dd4c74b06b49f7b56424bc84995 (diff) |
Cleanup: fix translation for rare UV unwrapping with unit scale
Fixes very rare cases where the UV Cylinder Project, UV Sphere Project
and UV From View might not set the translation correctly if the scale
is exactly 1.0.
Mainly fixed because this code might later be reused elsewhere.
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index ecaba3234a7..92efaf79de7 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1774,8 +1774,8 @@ static void uv_map_clip_correct(const Scene *scene, dy = 1.0f / dy; } - if (dx == 1.0f && dy == 1.0f) { - /* Scaling by 1.0 has no effect. */ + if (dx == 1.0f && dy == 1.0f && min[0] == 0.0f && min[1] == 0.0f) { + /* Scaling by 1.0, without translating, has no effect. */ return; } |