Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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)
Solved! Go to Solution.