maya

来源:互联网 发布:数据分析技术发展趋势 编辑:程序博客网 时间:2024/04/29 15:15
global proc string tSetCurveColor(string $curveContronl){//tSetCurveColor "curveName";int $i;float $poss[] = `xform -q -ws -t $curveContronl`;    if($poss[0] > 0)$i=6;    if($poss[0] < 0)$i=13;    if($poss[0] < 0.001 && $poss[0] > -0.001)$i=17;    string $shapes[] = `listRelatives -shapes $curveContronl `;    setAttr ($shapes[0] + ".overrideEnabled") 1;    setAttr ($shapes[0] + ".overrideColor") $i;    return $curveContronl;}