PDA

View Full Version : Huge trouble with mel scripting


anyms
09-30-2009, 09:39 PM
Okay so right now I'm taking the mel scripting class and the hw assignment due this week has me COMPLETELY stumped. I don't even know where to start and I've been trying.

The assignment was to take a selection and have all selected objects be randomly placed in 3 distinct locations.

I know its simple but I can't get my head around it. Any help whatsoever would be much appreciated!

Hans Schrijvers
10-01-2009, 12:52 PM
that doesn't seem so hard to me.

think about it this way:

identify your selection by making it into a variable array

then for all your objects in the array, translate the x,y,z coordinates over a random value.

then optionally, you could add a check to make sure non of the objects occupy the same location after the random transform, but that's just extra.

anyway, I hope this helps, I can't say much more than that or I'd basically 'd be doing your homework for you.

anyms
10-01-2009, 11:20 PM
Thanks for the input hans. Figured something out for the class, so much appreciated.