MEL How-To #97

Back · Previous · Next Maya

How do I get a list of all global variables currently defined?

Use the "env" command. I also like to sort the list so it's easer to scan.

string $allGlobals[] = `env`;
$allGlobals = `sort $allGlobals`;

print $allGlobals;

03 Apr 2004