I want to write a script that will take multiple objects, center their respective pivots and then translate the pivots in y to 0.
Here are two variations of my attempts so far:
string $sel[] = `ls -sl -typ transform`;
string $obj;
for ($obj in $sel) {
CenterPivot
setAttr ($obj + ".scalePivot") -ty 0;
setAttr ($obj + ".rotatePivot") -ty 0;
}
and
string $sel[] = `ls -sl -typ transform`;
string $obj;
for ($obj in $sel) {
xform -cp;
xform -piv 0 -0.098814 0;
}
In the second script the translate y moves to zero (-0.098814 from its start position) but z and x move away from the centre of the source object.