I fail to see the problem, why dont you just assign them directly to the animated objects? But if the objects are exactly the same and have exactly the same topology you coudl use this:
CODE
{//transfer object shader assignments to other
string $objs[]=ls -sl -dag -shapes
;
string $xforms[]=ls -sl
;
string $shaders[]=stringArrayRemoveDuplicates(ls("-et","shadingEngine",listConnections -d 1 ($objs[0]+".instObjGroups.objectGroups")
));
for ($shader in $shaders){
string $set[]=ls("-et","float3",sets -q $shader
,$xforms[0] );
string $temp=rename $xforms[0] ($xforms[0]+"tmp")
;
rename $xforms[1] $xforms[0];
sets -e -forceElement $shader $set;
rename $xforms[0] $xforms[1];
rename $temp $xforms[0];
}
}
Select object to trasfer from then one to transfer to.