Monday, June 29, 2009

Getting a Focus on the Command Line.

If you do a lot of command line work then this will make your day...
I was looking for a shortcut key to focus on the command line in Maya. I found some non-official documentation from and older version that said the ` key focus on command line... well that isn't true in newer versions of Maya. On top of that it doesn't have a shortcut key at all by default! Well i was digging around for a few min and I found this little gem.


setFocus $gCommandLine;


Alternatively you can use this code to toggle the command line and set focus in the event that your command line isn't already open.

if (`isUIComponentVisible("Command Line")` != 1) {
toggleUIComponentVisibility("Command Line");
}

global string $gCommandLine;
evalDeferred("setFocus "+$gCommandLine);



Set a hotkey with this command or add it to a marking menu and your set!

have fun...

2 comments: