系统自己提供的 非常方便进行轴向的改变。

fn alignUVGizmo theObj theFace =

(

---这个可以做很好的视图坐标。
 ---其实这个就是差乘的结果。这个在做造型的时候费城有用,

faceNormal = in coordsys theObj (getFaceNormal theObj theFace)

worldUpVector = [0,0,1]

rightVector = normalize (cross worldUpVector faceNormal)


upVector = normalize ( cross rightVector faceNormal )


theMatrix = matrix3 rightVector upVector faceNormal [0,0,0]

theMap = Uvwmap()

modPanel.addModToSelection theMap ui:on

theMap.gizmo.transform = theMatrix

)

alignUVGizmo $ 3

原文地址:https://www.cnblogs.com/gaitian00/p/2169950.html