This command allows you to get information on named contexts.
Flags:
Long Name / Short Name | Argument Types | Properties | |
---|---|---|---|
apiImage1 / ip1 | unicode | ||
c / c | bool | ![]() |
|
|
|||
escapeContext / esc | bool | ![]() |
|
|
|||
exists / ex | bool | ![]() |
|
|
|||
image1 / i1 | bool | ![]() |
|
|
|||
image2 / i2 | bool | ![]() |
|
|
|||
image3 / i3 | bool | ![]() |
|
|
|||
title / t | bool | ![]() |
|
|
Derived from mel command maya.cmds.contextInfo
Example:
import pymel.core as pm
# Create a particle tool context, then switch to it
pm.dynParticleCtx('dynParticleCtx1')
# Result: u'dynParticleCtx1' #
pm.setToolTo('dynParticleCtx1')
# Get the class type of the current context
ctx = pm.currentCtx()
pm.contextInfo(ctx, c=True)
# Result: u'dynParticle' #
# Get the title of the current context
pm.contextInfo(ctx, t=True)
# Result: u'Particle Tool' #