Go to: Synopsis. Return value. Flags. MEL examples.
contextInfo [-class] [-escapeContext] [-exists] [-image1] [-image2] [-image3] [-title]
[context name]
contextInfo is undoable, queryable, and editable.
This command allows you to get information on named contexts.
In query mode, return type is based on queried flag.
class, escapeContext, exists, image1, image2, image3, title
Long name (short name) |
Argument types |
Properties |
|
-class(-c)
|
|
|
|
Return the class type of the named context.
|
|
-escapeContext(-esc)
|
|
|
|
Return the command string that will allow you to exit the current tool.
|
|
-exists(-ex)
|
|
|
|
Return true if the context exists, false if it does not
exists (or is internal and therefore untouchable)
|
|
-image1(-i1)
|
|
|
|
Returns the name of an xpm associated with the named context.
|
|
-image2(-i2)
|
|
|
|
Returns the name of an xpm associated with the named context.
|
|
-image3(-i3)
|
|
|
|
Returns the name of an xpm associated with the named context.
|
|
-title(-t)
|
|
|
|
Return the title string of the named 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 be used more than once in a command.
|
// Create a particle tool context, then switch to it
dynParticleCtx dynParticleCtx1;
setToolTo dynParticleCtx1;
// Get the class type of the current context
string $ctx = `currentCtx`;
contextInfo -c $ctx;
// Result: dynParticle //
// Get the title of the current context
contextInfo -t $ctx;
// Result: Particle Tool //