Hi all,
I’m attempting to write a python script - but am having trouble figuring out a solution to a particular problem.
I’ve got this object which has thousands of battons;

I want to randomize the wood pattern so it all looks individual.
I have cobbled this together;
def getSpecificObjectsIntoArray(objectName):
return cmds.ls(objectName)
def randomUV(objectName):
for objects in getSpecificObjectsIntoArray(objectName):
rN = rand.uniform(0,1)
cmds.polyEditUV( relative=True, uValue=rN, vValue=rN )
randomUV('group*')
However it only works on selected UVs which means i have to currently select uv shells that i want to randomize.
How does one do a loop in python that cycles between uv shells in a selected object? Or faces for that matter.

