[Bf-blender-cvs] [c3e4fa74044] master: Cleanup: fix translation for rare UV unwrapping with unit scale
Chris Blackbourn
noreply at git.blender.org
Tue Nov 1 00:58:09 CET 2022
Commit: c3e4fa74044a5a2a38ec28cf66be45c98f982501
Author: Chris Blackbourn
Date: Tue Nov 1 12:50:16 2022 +1300
Branches: master
https://developer.blender.org/rBc3e4fa74044a5a2a38ec28cf66be45c98f982501
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.
===================================================================
M source/blender/editors/uvedit/uvedit_unwrap_ops.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list