DeleteHistory; CenterPivot;
//Store list of the selected objects in a string array string $selection[] = `ls -sl`; //For every item in that list... for($obj in $selection){ //Delete history and center pivot DeleteHistory; CenterPivot; }
import maya.cmds as mc selection = mc.ls(sl = 1) for obj in selection: mc.delete(obj , ch = 1)