I am looking for help if someone is willing to code a solution that sets the pivot point to the normal direction of selected objects (as long as each object doesnt have more than 1 normal direction) or selected subobject.
I used this code:
fn RotatePivotOnly obj index= ( rot = (matrixFromNormal (polyop.getFaceNormal obj index)*obj.transform ) as quat rotValInv=inverse rot animate off in coordsys local obj.rotation*=RotValInv obj.objectoffsetrot*=RotValInv obj.objectoffsetpos*=RotValInv ) for a in selection do ( setrefCoordSys #local CenterPivot a theNormal=polyop.getFaceNormal a 1 RotatePivotOnly a 1 )
… but it had limitations
- worked on sub-object only. If I have tenth of objects, I have to select one at a time, enter sub-object and select that only polygon and apply the code.
- if I run the code a second time, the pivot point that was facing properly, now points somewhere else.