这样做:
步骤1:
find the bottom point
.
步骤2:将轴设置为底点。
以下是MEL脚本帮助您执行此操作:
string $sel[]= `ls -sl`;
//$sel[0] != "" to check if the first item is empty, but `size $sel` == 1 already cover that
if(`size $sel` > 0)
{
int $vtxIdx;
int $vCount[];
float $lowestY = 2147483647.0;
float $crtY = 0.0;
float $pos[];
string $item;
for ($item in $sel)
{
$vCount = `polyEvaluate -vertex $item`; //Get vertex count
for ($vtxIdx = 0; $vtxIdx < $vCount[0]; $vtxIdx++)//Loop through vetex
{
$pos = `xform -q -ws -t ($item+".vtx["+$vtxIdx+"]")`;//Get vertex position
$crtY = $pos[1];
if($crtY < $lowestY)
{
$lowestY = $crtY;//Get the lowest Y
}
}
$pos = `xform -q -ws -t ($item)`;
xform -ws -a -piv $pos[0] $lowestY $pos[2] ($item);
print ($lowestY);
}
}
用途:
步骤1:选择需要将pivot设置为bottom的对象
步骤2:执行脚本
轴心点应该这样设置
如果您的要求是:轴心点必须在模型中,那么您应该稍微编辑一下这个脚本。