Hey,
Does anyone happen to have a script for Maya (2016) that will fill each object in a selection with a random vert colour?
Or know of a quicker way t do this than manually selecting them one by one, then changing the colour, then hitting apply colour, repeat...
Replies
string $Objects[] = `ls -sl -fl`; // Store current selectionfor ($Obj in $Objects) { // Start a loop that will go through each object in your selection listselect -r $Obj; // Select the first object in the looppolyColorPerVertex -rem ; // Remove any vertex color data on the selectionfloat $Color[] = `rand <<1,1,1>>`; // Create 3 random floating numberspolyColorPerVertex -r $Color[0] -g $Color[1] -b $Color[2] -a 0 -rel -cdo; // Assign the random numbers to each RGB channel} // Close your loopselect $Objects; // Reselect the original selectionAlso,you can bind the following line to a hotkey if you want to remove vertex color data on any given number of selected objects :
polyColorPerVertex -rem ;