Idon't Script MEL at all and I don't plan to
you dont need to, they have actualy doen this allready all you need is to type in the object you want to paint grid size randomizing factors wethere or not you want to caostrain and paint away, the demo is there you can directly use it (the manual has intructions for its use)
read especialy towards the bottom of the page:
http://localhost:4446/Maya6.0/en\_US/Painti...=paint+geometry
Oh sorry i meant normal costraint do this make the object normal costrained on the surface. Make it live, now when you move the object it orients along the surface then jsut copy it along the way. Note copy has a nasty sdeeffect off selecting the copy wich isnt costrained so insetad of normal copy its faster to do it.
with this code snipet, as it mekas moving and copying easier not sany rocket science here (just to make it a bit more user firendly):
{
$selection =ls -sl
;
duplicate;
select $selection[0];
}
run it for the first duplicate from shelf or whatever (just drag the text to shelf and itll be a button) then jsut keep moving and hit h to repeat that command after move, move hit h move hit h