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