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

Synopsis

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.

Return value

string

In query mode, return type is based on queried flag.

Flags

class, escapeContext, exists, image1, image2, image3, title
Long name (short name) Argument types Properties
-class(-c) create
Return the class type of the named context.
-title(-t) create
Return the title string of the named context.
-escapeContext(-esc) create
Return the command string that will allow you to exit the current tool.
-exists(-ex) create
Return true if the context exists, false if it does not exists (or is internal and therefore untouchable)
-image1(-i1) create
Returns the name of an xpm associated with the named context.
-image2(-i2) create
Returns the name of an xpm associated with the named context.
-image3(-i3) create
Returns the name of an xpm associated with 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.

MEL examples

// 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 //