I am trying to make a simple "allign tool" in maya using Python script, and this is how far I got
import maya.cmds as cmds
selected = cmds.ls(selection=True)
for all in selected:
cmds.getAttr('Cube.translateX')
And this seems to get the X position of the object names cube in the scene, However I would like it to get the translate of any object I selected.
I hope someone can help out, thanks