FORUMS: list search recent posts

Duplicate Special (vary every second copy)

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Karin Nacken
Duplicate Special (vary every second copy)
on Nov 2, 2015 at 11:19:44 am

Hi guys,

I was wondering if you can modify the duplicate special options (maybe by expression) so that an attribute will vary depending on the number of copy it will create.
To be more clear: I am building a wire fence, something like this. I've created one wire. To get this typical rhombus/quadtratic pattern, the next wire has to be tranformed a bit but more improtantly it has to be rotated by 180 degree or scaled to -1. The next (third) wire however needs the same (added) transformation but doesn't need to be rotated/scaled.
So I am looking for something to say: transform every copy/instance by 'value', scale/rotate every second copy by 'value'.
(Building the fence is not really an issue, I just became curious since I have never scripted in Maya but other programs to modify some things)


Return to posts index

Mohammad Taha
Re: Duplicate Special (vary every second copy)
on Nov 17, 2015 at 8:08:15 am

This should be work.

Just select the first object and run this script.

//$i<10 is for how many copys
//§j=100 how much to move into X direction
for( $i=0; $i<10; ++$i, $j=100)
duplicate `ls -sl`;

xform - translation ($j*$i) 0 0;
//rotation of the last copy. X Y Z
rotate -r 0 180deg 0;

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved