Maya - 如何从中心点向外移动多个对象

Maya - How can I move multiple objects from a center point outwards

a=如图所示,我想要 3 个对象(圆柱体的 3 个扇区)(Maya 2017)。我希望它向外或向 from/to 中心点移动它们。我也不希望它们的大小有任何比例。我能做什么?

这是一个带有抽象几何体的简单 MEL 脚本,您可以根据自己的目的进行调整。

请记住,您需要将所有枢轴移动到适当的坐标。在我的例子中是 0 0 0.

对于变量 $trans,您可以指定几何移动的距离(在局部轴上)。

polyPyramid -w 3 -ns 4 -sh 1 -sc 0 ;
setAttr "pPyramid1.rotateY" 45 ;
select -r pPyramid1 ;
move -r 0 1 0 pPyramid1.scalePivot pPyramid1.rotatePivot ;
move -r -os -wd 0 -1 0 ;

duplicate -rr ; 
rotate -r 0 0 90 ; 
for ( $i = 1; $i < 3; ++$i ) 
    duplicate -rr -st ; 

// This is a part of script for translating pyramids along their Y local axis

select pPyramid1 pPyramid2 pPyramid3 pPyramid4 ;
$trans = -5 ;
move -r -os -wd 0 $trans 0 ;

我在一个CG群里找到了答案...

用"Constraint Parent"工具解决。您必须将一个物体(任何东西)放在 3 个目标物体的中心。然后使用 "constraint parent" 将 3 个对象设置为中心对象。当您缩放中心对象时,其他 3 个对象只是向外移动而不缩放。 我相信这是做这种事情的最简单和标准的方法。