pymel.core.context.ctxEditMode¶
- ctxEditMode(*args, **kwargs)¶
This command tells the current context to switch edit modes.It acts as a toggle.
Flags:
Long Name / Short Name Argument Types Properties buttonDown / btd bool Edit mode is being invoked from a hotkey press event. buttonUp / btu bool Edit mode is being invoked from a hotkey release event. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.ctxEditMode
Example:
import pymel.core as pm # Create a poly cube pm.polyCube(w=2, h=2, d=2, n='pCube1') # Result: [nt.Transform(u'pCube1'), nt.PolyCube(u'polyCube1')] # # Create a new rotate manip context, then switch to it. pm.manipRotateContext('manipRotateContext1') # Result: u'manipRotateContext1' # pm.setToolTo('manipRotateContext1') # Switch to edit mode to change pivots pm.ctxEditMode()