28.2.12

Maya : Using Operators to flip Anim Curves in the Graph Editor

One neat trick in Maya is the ability to use MEL operators as a shorthand way to manipulate transforms, rotates and scales.

Valid operator are: += to add, -= to subtract, *= to multiply and /= to divide.

Say you wanted to move a selection of objects all up by a set amount. You could use the 'relative transform' box on the status line, if you don't use a snap that is. However, if you entered '+=5' in the translateY channel box of the selected meshes then you'd move everything selected up by 5 in the Y.

Where this is really neat is that this trick also works in the Graph Editor. You can offset curves by a fixed amount. You can scale -1 and flip curves and key frames, all by entering a operator in the value side of the stats box. Chris Lesage added that by typing a percentage in, then the existing value will be calculated to the new value. To use Chris's example, if you have '2' and you type '110%' then you get '2.2'.

4 comments:

  1. Yep, very useful. You can also use % to shift by percentage. So for example, if you have '2' and you type '110%' then you get '2.2'

    ReplyDelete
  2. Hi Chris,

    That's really useful to know, I'll add that to the post. Thanks

    ReplyDelete
  3. Unfortunately that does nothing for tangent values. The curve will be totally messed up but the keyframe values will be inverted.

    ReplyDelete
  4. Can you explain this in more detail? I can't seem to get it to work.

    ReplyDelete