Running Maya 2022.
in code below I would like to use
a variable with the setAttr() function
to move a locator to a different position.
Getting this error in the script editor:
line 2: Invalid argument 1, ‘[‘locator1’]’. Expected arguments of type ( list, )
import maya.cmds as cmds
Loc = cmds.spaceLocator( p=(0, 0, 0))
cmds.setAttr(Loc,’.translate’, 10,20,30)