Eh all,
So, my knowledge with mel scripting is very limited but I figured out the basics of the script at the bottom of this link
http://ndhaussy.free.fr/maya_object_spreading/ where
Nicolas shows how to spread using constraints. So I type the command spreadObjectsOnSurface ("objectB", "objectA", 20) and it works as expected.
Now comes my question, because I have no idea how to even word it to find what I need to know using Google (I've tried with no close luck). Say I have 20 copies of objectB on objectA using the command above, but now I want 6 objectC on every objectB, how would I type this command?? I assume I need to know something about using a variable of some sort??
Thanks everyone
Replies
I'll look up recursion, but any more help someone might have would also be great, thanks!
So, loop through an array of all the objectB's in the scene after they are created and then run the spreadObjectsOnSurface function until you've looped through the entire array of objectB's.
Google up on arrays and loops.
I have lots of experience with programming, but I ended up buying a video tutorial series from Eat3D for scripting in Maya and it was worth it. http://eat3d.com/maya_scripting