diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-18 10:44:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-18 10:44:41 +0400 |
commit | ce00a32f05c6429b7bffd80365a94a71755a55f5 (patch) | |
tree | 0540951de2bde5e31d952abcd6b531a328b42444 /release | |
parent | 8dd72c476e51ee457fdd98625eff7a1afc88f49e (diff) |
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.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_smart_project.py | 10 |
1 files 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): |