A little while ago Nasheet posted a comment about solving some of the issues people were having with the transferUV script I posted here:
It worked well for most of the meshes in my scene, but I did get the
same error as teezy5 for a couple of them, and I think I found a
solution. The error was thrown from:
problem in my case was that there was more than one object named
'$targetOrig' in my scene, and thus the return value of the 'getAttr'
was an int containing the intermediateObject values for all matching
objects, instead of just an int. In order to only get the unique
intermediateObject for the selected geometry, 'listRelatives' needs to
return the full dagpath. Basically, I just changed the line:
string $targetShapes = `listRelatives-s $target`;
string $targetShapes = `listRelatives-s -f $target`;
And it worked. That's it! Thank you again!
Haven't had a chance to play with it, but sounds right to me. . .
Here's the fixed script: zbw_cleanTransferUV.mel