her is code for object what is work fine but it need to be named =[
my code - work well but with name
PHP Code:
import maya.cmds as mc
mc.setAttr("cube.rotate", 0, 0, 0)
mc.setAttr("cube.translate", 0, 0, 0)
PHP Code:
import maya.cmds as mc
selection = mc.ls(sl = 1)
for obj in selection:
mc.setAttr("obj.rotate", 5, 5, 5)