I'm trying to use a camera bake script from maya 2011 in 2015 but getting an image plane error. It seems Maya now puts a transform above the image plane. I also see theres an "imagePlane" procedure now. Anyone have any ideas on how to attach an existing image plane to a duplicated camera?
string $oldCamera[] = `ls -l -sl`;
string $results[];
string $curCam = $oldCamera[0];
string $listRelCam[] = `listRelatives -f -type "camera" $curCam`;
string $newCamera[] = `duplicate -rr $curCam`;
string $oldShape[] =`listRelatives -f -s $curCam`;
string $newShape[] = `listRelatives -f -s $newCamera[0]`;
//attach the image plane
string $oldShape[] =`listRelatives -f -s $curCam`;
string $newShape[] = `listRelatives -f -s $newCamera[0]`;
string $imagePlanes[] = `listConnections -d 1 ($oldShape[0] + ".imagePlane")`;
int $count = 0;
for ($im in $imagePlanes)
{
connectAttr -f ($im + ".message")($newShape[0] + ".imagePlane[" + $count + "]");
$count++;
}