Today I wrote a little tool that simply groups whatever you have selected, for the purposes of cleaning up transforms. Also works with multiple objects selected and groups them all under a group in the same worldspace as the first selected object.
Grab the code here and place it on your shelf.
import maya.cmds as cmds import maya.OpenMaya as om grpList = cmds.ls(sl = True) parentObj = cmds.listRelatives( grpList[0], parent = True ) cmds.group( em = True, name = grpList[0] + '_Zero_GRP' ) cmds.parentConstraint( grpList[0], grpList[0] + '_Zero_GRP' ) cmds.delete( grpList[0] + '_Zero_GRP_parentConstraint1' ) cmds.scaleConstraint( grpList[0], grpList[0] + '_Zero_GRP' ) cmds.delete( grpList[0] + '_Zero_GRP_scaleConstraint1' ) cmds.parent( grpList[0], grpList[0] + '_Zero_GRP' ) try: cmds.parent( grpList[0] + '_Zero_GRP', parentObj ) om.MGlobal.displayInfo( grpList[0] + ' now has a group above it' ) except: om.MGlobal.displayInfo( grpList[0] + ' has no parent object, grouped in world space' ) cmds.select( grpList[0] ) newParent = cmds.listRelatives( parent = True ) listEndNumber = len(grpList) remainingObj = grpList[1:int(listEndNumber)] for i in remainingObj: cmds.parent( i, newParent ) om.MGlobal.displayInfo( grpList[0] + ' now has a group above it' )