Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

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.

Return value

None

Flags

down, left, right, up
Long name (short name) Argument types Properties
down(d) boolean create
Move "down" as defined by the current context.
left(l) boolean create
Move "left" as defined by the current context.
right(r) boolean create
Move "right" as defined by the current context.
up(up) boolean create
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.

Python examples

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)