Go to: Synopsis. Return value. Related. Python examples.
setKeyPath(
[object]
)
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
setKeyPath is undoable, queryable, and editable.
The setKeyPath command either creates or edits the path (a nurbs curve) based on the current position of the selected object at the current time.import maya.cmds as cmds # Apply setKeyPath command on the currently selected object at current time: cmds.setKeyPath() # Apply setKeyPath command on an object named "ball" at current time: cmds.setKeyPath( 'ball' )