global proc alienRenameShapes() { //select all objs string $allObjs[] = `ls -type transform`; //get the list of the non-deletable objects, need that to remove reference objs that i can't rename string $nonDeletable[] = `ls -ro`; //remove the non-deletable from the selection string $allObjsDeletable[] = stringArrayRemoveExact($nonDeletable, $allObjs); string $shapeName[]; string $shapeNameCorrect; for ($i = 0; $i < `size $allObjsDeletable`; $i++) { //get the shape string $shapeName[] = `listRelatives -s $allObjsDeletable[$i]`; if ($shapeName[0] != "") { //build the name $shapeNameCorrect = $allObjsDeletable[$i] + "Shape"; //rename string $shapeNameOld = $shapeName[0]; if ($shapeNameOld != $shapeNameCorrect) { rename $shapeNameOld $shapeNameCorrect; print ($shapeNameOld + " --> " + $shapeNameCorrect + "\n"); } } } }