Sorry, I am late to this thread. I was experimenting with this idea a year ago and I actually got something very similar to what Marcus did but this was my approach…
Method 1.
Orienting the view to the face normal using PixolPick
[VarSet,DocWiCent,(Document:Width*.5)]//Find center of the document
[VarSet,DocHeCent,(Document:Height*.5)]//
[VarSet,Horz,[MouseHPos]]
[VarSet,Vert,[MouseVPos]]
[VarSet,Ux,[PixolPick,6,Horz,Vert]]
[VarSet,Uy,[PixolPick,7,Horz,Vert]]
[VarSet,Uz,[PixolPick,8,Horz,Vert]]
[VarSet, TT, ACOS(Uy)]// Find the vertical angle
[VarSet,PP, ATAN2(Uz,Ux)]//Find horizontal angle
[VarSet,RotVer,(TT-90)*2.7777] //vertical angle to pixols length
[VarSet,RotHor,(PP+90)*1.1111] // Horizontal angle to pixol length
[TransformGet, XXX,YYY]
[IFreeze,
//[IPress,Transform:Move]
[CanvasClick,#Horz,#Vert]
[If, Horz>XXX, [VarSet,SUMX, XXX-(Horz-DocWiCent)], [VarSet,SUMX,XXX +(DocWiCent-Horz)]]
[If, Vert>YYY, [VarSet,SUMY, YYY-(Vert-DocHeCent)], [VarSet,SUMY,YYY +(DocHeCent-Vert)]]
[TransformSet, SUMX,SUMY]
]
[IClick,1004,-15,DocHeCent,-15-RotHor,DocHeCent+RotVer] // Drag click to make rotation
Method 2.
Orienting the View Based on the current Transpose line direction OR if using a hotkey it will create one (normal to the surface) when pressing the hotkey over a mesh.
Here I use a tool called reference.ztl that is a simple small low poly sphere. This is not a requirement but it’s there to make sure the transpose line (That it will look just 3 concentric circles ) falls exactly in the center of the document.
[IFreeze,
[VarSet,BaseToolID,[ToolGetActiveIndex]]
[If,[IExists,Tool:Reference],
,//Else
[FileNameSetNext,“Reference.ztl”] [IPress,Tool:Load Tool] ]
[VarSet,DocWiCent,(Document:Width*.5)]//Find center of the document
[VarSet,DocHeCent,(Document:Height*.5)]//
[VarSet, HorO,[MouseHPos]] // Find Mouse Position
[VarSet, VerO,[MouseVPos]]//
[IPress,Transform:Scale]// select the Move mode
[CanvasClick,HorO,VerO]// click to create Transpose line
[IPress,Transform: Draw Pointer]
[TransposeGet, INIx, INIy, INIz, FINIx, FINIy, FINIz, LGT] // Find positions and length of transpose Line
[TransformGet,NxxD,NyyD,NzzD,SCori]
[VarSet,Ux, INIx-FINIx/LGT]// Find the Unit vectors
[VarSet,Uy, INIy-FINIy/LGT]//
[VarSet,Uz, INIz-FINIz/LGT]//
[VarSet, T, ACOS(Uy)]// Find the vertical angle
[VarSet,P, ATAN2(Uz,Ux)]
[If,(T==180) || (T==0),[VarSet,P,90],]
[VarSet,Yangle, 90-P] //Adjust this angle to the Zbrush convention
[If, (Yangle>=90) || (Yangle<=-90),[VarSet,condito,-180],[VarSet,condito,0]]
[TransformSet, 10, 10, 10,0,Yangle,condito] // make the horizontal rotation
[VarSet,RotVer,(T-90)*2.7777] //vertical angle to pixols lenght
[IClick,1004,-15,DocHeCent,-15,DocHeCent-RotVer] // Vertical rotation …rotate this way can cause troubles if there is a mesh at that position and there is no margin
[IPress, Tool:Reference]
[ISet,Tool:Geometry:X Position,INIx]// move the subtool
[ISet,Tool:Geometry:Y Position,INIy]
[ISet,Tool:Geometry:Z Position,INIz]
[IPress,Transform:Fit] //Fit in view
[TransformGet,NxxD,NyyD,NzzD,SCx]
[TransformSet,DocWiCent+((NxxD-DocWiCent)*SCori/SCx),DocHeCent+((NyyD-DocHeCent)*SCori/SCx),0,SCori,SCori,SCori]
[ToolSelect,BaseToolID]
]// Close Freeze