//Create an Array of selected objects<br>string $listtoflipped[] =`ls -sl -fl`;<br>//Get size of the array for the loop command<br>int $sizeofarrayflip= `size $listtoflipped`;<br><br>//Loop that will go though all of the objects in the array<br>for($L = 0; $L < $sizeofarrayflip; $L++) {<br> //randomly creates a float between 1 and 2 but by making it an integer you only get either 1 or 2<br> int $randomint = `rand 1 2.9`;<br> //uses the random number to either flip x or y<br> if ($randomint==1){<br> polyFlipUV -flipType 0 -local on $listtoflipped[$L];<br> } <br> if ($randomint==2){<br> polyFlipUV -flipType 1 -local on $listtoflipped[$L];<br> }<br>}
Version 2 will flip x or y or not at all
//Create an Array of selected objects<br>string $listtoflipped[] =`ls -sl -fl`;<br>//Get size of the array for the loop command<br>int $sizeofarrayflip= `size $listtoflipped`;<br>//Loop that will go though all of the objects in the array<br>for($L = 0; $L < $sizeofarrayflip; $L++) {<br> //randomly creates a float between 1 and 2 but by making it an integer you only get either 1, 2 or 3<br> int $randomint = `rand 1 3.9`;<br> //uses the random number to either flip x or y or not at all<br> if ($randomint==1){<br> polyFlipUV -flipType 0 -local on $listtoflipped[$L];<br> } <br> if ($randomint==2){<br> polyFlipUV -flipType 1 -local on $listtoflipped[$L];<br> }<br> if ($randomint==3){<br><br> }<br>}
Replies
I've made 2 scripts
Version 1 will flip x or y
Version 2 will flip x or y or not at all
Hope that helps.
Is it possible to make it flip the Objects UV Shell only, instead of the individual UV vertices itself?
Cheers!