1. import maya.cmds as cmds
  2. #set manipulator to "move"
  3. cmds.setToolTo("moveSuperContext")
  4. #query th position of the move manipulator wich is
  5. #at the center of selection by default
  6. # the "m" flag makes it so the command returns worldSpace coordinates
  7. manipPos = cmds.manipMoveContext("Move", q=True, p=True, m=2)
  8. print manipPos
  9. #place a locator for visual purposes
  10. cmds.spaceLocator(p=(manipPos[0], manipPos[1], manipPos[2]))