Reputation: 329
a=As you can see in the picture, I want to have 3 pieces of objects ( 3 Sector of a cylinder ) ( Maya 2017 ). And I want it to be moving them equally outward or in from/to the center point of them. I also don't want any scale in their size. What can I do?
Upvotes: 1
Views: 1975
Reputation: 58413
Here's a simple MEL script with abstract geometry that you can adapt for your purposes.
Remember, you need to move all the pivots to appropriate coordinates. In my case it's 0
0
0
.
For variable $trans
you can assign a distance that the geometry travels along (in local axis).
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 ;
Upvotes: 0
Reputation: 329
I found the answer in a CG group ...
It solve with "Constraint Parent" tool. You must place an object (any thing) in the center of 3 targeted objects. Then use "constraint parent" to parent 3 objects to center object. hen when you Scale the center object, the other 3, just moving outward and don't scale. I believe this is the simplest and a standard way to doing such a things.
Upvotes: 1