Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   mapping multiple objects in mel (https://simplymaya.com/forum/showthread.php?t=29932)

bendingiscool 19-05-2008 03:13 AM

mapping multiple objects in mel
 
I have a bunch of cubes and I would like to write a script that does an automatic map on them. I tried this after selecting all the cubes...

string $polyBlocksArray[] = `ls -sl`;

for ($myObject in $polyBlocksArray) {

polyAutoProjection;

}

I get an error saying "Doesn't work with multiple objects selected". How would I go about getting the loop to go through them one at a time and map that way?

Many thanks in advance
Chris

bendingiscool 19-05-2008 05:33 AM

Nevermind I got it, forgot to put the select command in there, heres the revised version...

string $polyBlocksArray[] = `ls -sl`;

for ($myObject in $polyBlocksArray) {

select $myObject;
polyAutoProjection;

}

Cheers, Chris


All times are GMT. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018