From ce00a32f05c6429b7bffd80365a94a71755a55f5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 Jul 2011 06:44:41 +0000 Subject: [PATCH] fix [#27996] Smart UV Unwrap Still Results in Overlaps real fix this time :S, I thought using old code from 2.4x would fix but quaternion needed to be inverted. --- .../startup/bl_operators/uvcalc_smart_project.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 7ea89cfa479..9c3be84b807 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -747,14 +747,8 @@ def packIslands(islandList): def VectoQuat(vec): - a3 = vec.normalized() - up = Vector((0.0, 0.0, 1.0)) - if abs(a3.dot(up)) == 1.0: - up = Vector((0.0, 1.0, 0.0)) - - a1 = a3.cross(up).normalized() - a2 = a3.cross(a1) - return Matrix((a1, a2, a3)).to_quaternion() + vec = vec.normalized() + return vec.to_track_quat('Z', 'X' if abs(vec.x) > 0.5 else 'Y').inverted() class thickface(object):