Duplicate array script
Hi,
I'm just getting started with scripting and I'm trying to create a simple script that would duplicate an object i've created in an array. I found a bunch of tutorial on how to create an array of objects with a for loop and I can get as far as that, but when it comes to duplicates, they all appear on top of each other... Here's my script: // I'll use a sphere for the purpose of this example //but in reality it is 2 planes grouped together polySphere; rename pSphere1 a1; int $i; for($i=1; $i<7; $i++){ duplicate a1; move ($i*2) 0 ($i*2); } Any ideas? |
i tried moving an object in 3d space and seeing what it says in the script editor
don't you need to write it as: Code:
move -r ($i * 2) 0 ($i * 2); |
The -r after move is relative to the last position. -a is absolute, just so you don't get confused :)
|
All times are GMT. The time now is 03:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018