Hi There,
I had for R21 this script. It was working like reset PSR, but for the object axis only.
Could anyone help me please to get this great little helper back for the R23?
Thank you very much,
Best,
Peter
import c4d
from c4d import Vector as V
def main():
if op is None or not op.CheckType(c4d.Opoint):
return False
ObjMatrix = op.GetMg()
ObjPoints = op.GetAllPoints()
Pcount = op.GetPointCount()
doc.StartUndo()
doc.AddUndo(c4d.UNDOTYPE_CHANGE, op)
op.SetAbsRot(V(0))
op.SetAbsPos(V(0))
op.Message(c4d.MSG_UPDATE)
NewMatrix = op.GetMg()
for point in xrange(Pcount):
op.SetPoint(point,~NewMatrix*ObjMatrix*ObjPoints[point])
op.Message(c4d.MSG_UPDATE)
c4d.EventAdd()
doc.EndUndo()
if __name__=='__main__':
main()