Go to: Synopsis. Return value. Flags. Python examples.
ctxTraverse([down=boolean], [left=boolean], [right=boolean], [up=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
ctxTraverse is undoable, NOT queryable, and NOT editable.
This command tells the current context to do a traversal.
Some contexts will ignore this command. Individual contexts
determine what up/down left/right mean.
None
down, left, right, up
Long name (short name) |
Argument types |
Properties |
|
down(d)
|
boolean
|
|
|
Move "down" as defined by the current context.
|
|
left(l)
|
boolean
|
|
|
Move "left" as defined by the current context.
|
|
right(r)
|
boolean
|
|
|
Move "right" as defined by the current context.
|
|
up(up)
|
boolean
|
|
|
Move "up" as defined by the current context.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
# Create a particle context, then switch to it
cmds.dynParticleCtx('dynParticleCtx1')
cmds.setToolTo('dynParticleCtx1')
# Now you can create particles by mouse clicking
# After creating several particles, we switch to edit mode
cmds.ctxEditMode()
# Traverse in the created particles
cmds.ctxTraverse(left=True)
cmds.ctxTraverse(left=True)
cmds.ctxTraverse(right=True)