Beer glass scene creation
This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 1 04-03-2006 , 07:01 AM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224

The MEL "alias" command and how you can use it

During the building process of the Walkerman program that I created, I found that it was necessary at times to re-call up a window if I had closed it, and since I had to do it quite often,
I soon discovered a good use for the MEL "alias" command.

This example has two functions, one that will alias the command for bringing up the biped's control window, and the other that will bring up the quadraped's control window.

Prior to running this little proc, you would have to type out the whole "getSliderWindow" or the whole "quadSliderWindow" in the command line . . . . a waste of time! :headbang:

So, you create this little proceedure, and put it in the scripts folder and after it has been run, all you have to do is type

w (plus the parameter)
in the command line to bring up the biped control window, and

q (plus the parameter)
in the command line to bring up the quadraped control window.

otherwise you would have to type
getSliderWindow 1;

The "1" is an example of the parameter which I will explain, it has nothing to do with the alias command.

global proc aliasCommands(){
// substitute w for "getSliderWindow"
alias w getSliderWindow;

// substitute q for "quadSliderWindow"
alias q quadSliderWindow;
};

It saves you a lot of typing. But I had better explain the parameter to those of you who have downloaded the Walkerman program . . . .

The parameter is there in the case that you have created MORE THAN ONE biped or quadraped character . . . .

If you have only one biped, to bring the window back up, you would type

w 1;
You must always have part of the character bones you are working on selected, otherwise it will holler at you!

If you have more than one biped created, to bring the correct one up, you would select any part of the bones of the one you want, look at the number at the end of the name of whatever part of the character (bones) are selected, so for example if you see - "ls3", then you would know you have selected the 3rd biped character in the scene, and to bring up its window, you just type

w 3;

in the command line. It works the same with the quadraped character. The program is written so that the code can distinguish the difference between a quadraped and a biped, so if you have for example, 2 bipeds and 4 quadrapeds in the scene,
to bring up the second biped window and the fourth quadraped window, you would select any part of the bones of the second biped, then type:

w 2;

and any part of the quadraped bones and type

q 4;

By the way . . . I did not include this code in the download, but I will here, so you can include it in the script folder.

If you have downloaded the Walkerman program and you have any questions, comments, suggestions . . . I would be glad to hear them.

At present, I am working on a button that will create a Centaur . . . I have done the coding that will make it work, I just need to create a more streamlined procedure.

Cheers . .

Attached Files
File Type: mel aliascommands.mel (90 Bytes, 213 views)

"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
# 2 04-03-2006 , 07:06 AM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224

Lower cased "C"

For some reason, the "C" got lowercased in the uploaded version of the aliasCommands.mel file . . . . it NEEDS to be upper case. Change the "c" to "C" or just download the zip here and unzip it . . . .. .

Attached Files
File Type: zip aliascommands.zip (200 Bytes, 214 views)

"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off