Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 22-03-2006 , 09:06 AM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224

Editing Expressions

To create an expression in MEL, you would do this:

expression -s "ls.rotateY = time;" -o expression1 -ae 1 -uc all ;
// Result: expression1 //

I actually did not code that, I did it in the expression editor and just copied it out of the script editor. . . But it is handy to know how to write the code. If you want to edit an expression after it has already been created, you would do this:

expression -e -s "ls.rotateY = time * 3;" -o expression1 -ae 1 -uc all expression1;
// Result: expression1 //

Note the extra -e in the edit expression code. You also must name the expression which you wish to edit! (expression1).

The usefullness in this coding is very well demonstrated in the Walkerman program as part of the code that controls the ability to toggle the hand control so you can either control all four fingers at once or one finger at a time . . . . user added image


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
# 2 25-03-2006 , 02:01 PM
Registered User
Join Date: Oct 2004
Posts: 27
I normally keep all my expressions in one place, eg create a locator and add an attribute to it, say DoNotDelete, and set it in the expression to 1.

ExpLocator.DoNotDelete = 1;

then all the other expressions get stuck under this one. Not to everyones tastes perhaps but when you have a lot going on i find it much quicker to scroll than remember the name or where it was.

AnDy

# 3 25-03-2006 , 05:36 PM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
My trick is searching out the string that builds the expression. It is unique, because Maya will not allow you to create two expressions controlling the same attribute like "ls.rotateY". If I need to change an expression in run time, I just search it out and edit it. If I want to see the expression as it appears, I just copy it to the script editor and print it. This is a key method used in the Walkerman program I created, it allows me to change the gaits and control the hands in runtime.


"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

Similar Threads