Autodesk Maya: Python Script, Transfer Attributes "Multiple"

Found on

Select one object, then select any number of other objects and this will transfer the UVs from the first to the others.

“import maya.cmds as cm

#grab all the selected objects

selectedObjects =

#save first one into variable

#pop first one out of the selected objects list

driver = selectedObjects.pop(0)

#for each object in the selected objects list

for object in selectedObjects:[driver,object])

#transfer attributes

cm.transferAttributes(sampleSpace=4,transferUVs=2, transferColors=2 )”