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.
This commit is contained in:
Campbell Barton
2011-07-18 06:44:41 +00:00
parent 8dd72c476e
commit ce00a32f05

View File

@@ -747,14 +747,8 @@ def packIslands(islandList):
def VectoQuat(vec): def VectoQuat(vec):
a3 = vec.normalized() vec = vec.normalized()
up = Vector((0.0, 0.0, 1.0)) return vec.to_track_quat('Z', 'X' if abs(vec.x) > 0.5 else 'Y').inverted()
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()
class thickface(object): class thickface(object):