pymel.core.context.ctxTraverse

ctxTraverse(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
down (d) bool ../../../_images/create.gif
 
Move “down” as defined by the current context.
left (l) bool ../../../_images/create.gif
 
Move “left” as defined by the current context.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
right (r) bool ../../../_images/create.gif
 
Move “right” as defined by the current context.
up (up) bool ../../../_images/create.gif
 
Move “up” as defined by the current context.

Derived from mel command maya.cmds.ctxTraverse

Example:

import pymel.core as pm

import maya.cmds as cmds

# Create a particle context, then switch to it
pm.dynParticleCtx('dynParticleCtx1')
pm.setToolTo('dynParticleCtx1')

# Now you can create particles by mouse clicking
# After creating several particles, we switch to edit mode
pm.ctxEditMode()

# Traverse in the created particles
pm.ctxTraverse(left=True)
pm.ctxTraverse(left=True)
pm.ctxTraverse(right=True)

Previous topic

pymel.core.context.ctxEditMode

Next topic

pymel.core.context.currentCtx

Core

Core Modules

Other Modules

This Page