How to : Create Expressions Without the Expression Editor in Maya

There's a really quick way of getting a simple expression on a channel in Maya.

In the attribute editor, just type in your expression starting with a '' in the field you wish to modify.

For example, when I'm designing cranks or cams, I often just want something rotating at a constant rate and don't want the faff of keyframing. So I'll select the object I want rotating, and enter  ' =frame * 10 'in the field for the Z rotation in the attribute editor.

Now when I scrub the timeline, it will always rotate. Btw, frame is a pre-defined variable and refers to the current frame and the * 10 is a multiplier, so I know that on frame 36 I've rotated by 360 degrees.

There's plenty of scope for this, you can use it for connecting channels or I've even used it to lock channels, just put =0 on the rx,ry and rz channels of an object to stop it's rotation, though that's probably taking it a little too far.

No comments:

Post a Comment