SI has a pivot transformations that can be keyed without using a Center operator. The awkward thing for me is that this is done by changing the parameters values from the ppg window and translation of the pivot happens relatively to local transformation matrix of the object. So I wrote this handy little script that allow you to just pick a position in space that would be a new pivot center of the current frame
Code:
xsi = Application
frame = xsi.GetValue("PlayControl.Current")
pivot = xsi.PickPosition("Set new pivot position and key it", "Remove key on the current frame")
if pivot[0] == 1:
v3 = XSIMath.CreateVector3(pivot[1],pivot[2],pivot[3])
m4x4 = XSIMath.CreateMatrix4()
obj = xsi.Selection[0]
obj.Kinematics.Global.Transform.GetMatrix4(m4x4)
m4x4.Invert(m4x4)
v3.MulByMatrix4InPlace(m4x4)
x, y, z = 0, 0, 0
x, y, z = v3.Get(x, y, z)
xsi.SetValue("*.kine.local.pposx", x)
xsi.SetValue("*.kine.local.pposy", y)
xsi.SetValue("*.kine.local.pposz", z)
xsi.SavePivotKey(["*"], "siTrn", frame)
xsi.RotationTool()
elif pivot[0] == 2:
try:
xsi.RemoveKey("*.kine.local.pposx,*.kine.local.pposy,*.kine.local.pposz,*.kine.local.pcposx,*.kine.local.pcposy,*.kine.local.pcposz", frame)
except:
pass