Quote:
[IButton,???,"Align View to Plane",
[VarSet,xNorm,0]
[VarSet,yNorm,0]
[TransformGet, xPos, yPos, zPos, xSc, ySc, zSc, xRot, yRot, zRot]
[VarSet,z,[PixolPick,1,[MouseHPos],[MouseVPos]]]
[If,z < 2800,
[VarSet,xNorm,[PixolPick,6,[MouseHPos],[MouseVPos]]]
[VarSet,yNorm,[PixolPick,7,[MouseHPos],[MouseVPos]]]
]
[If,xNorm < 0,
[TransformSet, , , , , , , , ((yRot)+(xNorm*90)), zRot]
,
[TransformSet, , , , , , , , ((yRot)-(xNorm*90)), zRot]
]
[If,yNorm < 0,
[TransformSet, , , , , , , ((xRot)-(yNorm*90)), , zRot]
,
[TransformSet, , , , , , , ((xRot)+(yNorm*90)), , zRot]
]
]