Go to: Synopsis. Return value. Flags. Python examples.
pickWalk(
[objects]
, [direction=string], [type=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
pickWalk is undoable, NOT queryable, and NOT editable.
The pickWalk command allows you to quickly change the selection list relative to the nodes that are currently selected. It is called pickWalk, because it walks from one selection list to another by unselecting what's currently selected, and selecting nodes that are in the specified direction from the currently selected list. If you specify objects on the command line, the pickWalk command will walk from those objects instead of the selected list.If the -type flag is instances, then the left and right direction will walk to the previous or next instance of the same selected dag node.
string[] | A list of the newly selected items |
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
direction(d)
|
string
|
![]() |
||
|
||||
type(typ)
|
string
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds # Given the transforms A and B which are parented to a transform C, # and C is instanced with parents D and E. cmds.pickWalk( 'A', direction='right' ) cmds.select('|E|C') cmds.pickWalk( type='instances', direction='left') # The pickWalk command also works on CVs and edit points cmds.select('nurbsPlaneShape1.cv[2][1]') cmds.pickWalk(direction='right' ) # Result: nurbsPlaneShape1.cv[3][1] # cmds.pickWalk( direction='up' ) # Result: nurbsPlaneShape1.cv[3][2] # cmds.select( 'curveShape2.ep[1]' ) cmds.pickWalk( direction='left' ) # Result: curveShape2.ep[0] #