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

Synopsis

whatIs string

whatIs is NOT undoable, NOT queryable, and NOT editable.

This command takes one string type argument and returns a string indicating whether the argument is a builtin "Command", a "Mel procedure", a "Script", or a variable. If it is a variable, the type of the variable is also given. If it is none of these things, whatIs returns the string "Unknown".

If the argument is a Mel procedure or a script file, the path to the file containing the script or procedure is included in the return value.

Notes

The difference between a "Mel Procedure" and a "Script" can be subtle. If a procedure has not been invoked, and therefore never compiled, the whatIs command will search for a file of the same name. However, this file could contain a script (a series of Mel statements/commands) or it could contain a procedure definition. Because Mel will not compile the file just to execute the whatIs command, it cannot distinguish which it is. In these cases, the whatIs command will return the string "Script".

Return value

stringArgument type

MEL examples

whatIs "sphere";
// Result: Command //

whatIs "initToolBox";
// Result: Mel procedure found in: /u/mayauser/maya/scripts/initToolBox.mel //

whatIs "kaosFieldTest";
// Result: Script found in: /u/mayauser/maya/scripts/kaosFieldTest.mel //

whatIs "fdsafda";
// Result: Unknown //

int $abc[42];
whatIs "$abc";
// Result: int[] variable //

$s=`pwd`;
whatIs "$s";
// Result: string variable //