我想编写一个脚本,该脚本将采用多个对象,将它们各自的枢轴居中,然后将 y 中的枢轴转换为 0。
到目前为止,这是我尝试的两种变体:
string $sel[] = `ls -sl -typ transform`;
string $obj;
for ($obj in $sel) {
CenterPivot
setAttr ($obj + ".scalePivot") -ty 0;
setAttr ($obj + ".rotatePivot") -ty 0;
}
和
string $sel[] = `ls -sl -typ transform`;
string $obj;
for ($obj in $sel) {
xform -cp;
xform -piv 0 -0.098814 0;
}
在第二个脚本中,平移 y 移动到零(从其起始位置开始 -0.098814),但 z 和 x 远离源对象的中心。