MEL Expression - Animate Second's hand in clock with expression in Maya

Its a easy way to animate a second's pointer(hand) in a clock with expression inside Maya software.
 To do so, Select second's hand and write expression in rotate channel with the given expression.
pointer.rotateY=ceil(time)*6;.

 Ceil expression is basically used to make any floating number to a higher integer value. For example, if ceil(2.5) is written, 3 is value you get with it. 

Time returns the value of time, for example if you are 24th frame, then the value you get is 1. As second is unit of time, for 24 frames is 1 second, the value you get is 1.

At this level, pointer snap rotates with 1 degree for 24 frames, but it should rotate 6 degrees for second. So, I multiplied it with 6.

Here is the video link of the above tutorial


Comments