From the Blog



Here’s a MEL script to help animate something folding and unfolding in Maya.

EDIT: 2/13/2014 Now you can download the script directly instead of cutting & pasting, which seemed to be messing things up for some people.


EDIT: 2/10/2014 I tweaked this code to fix a problem in the findAngle function. If you animate something with this script, please send a link to frankrause at gmail dot com, I’d love to see it.

Select a polygonal object and run it. It’ll set up a manipulator with the following animateable attributes:

Paper Thickness: The thickness for each paper segment
Paper Fold: The higher the angle, the more an object is folded
Overlap: The lower the number, the more each segment’s folding overlaps the other segments. If it’s set to zero, all faces unfold at once.
Angle Hide: As each segment folds past this angle, it is made invisible
Scale Bend: Makes each segment shrink as it folds
Scale Bend On Off: Turns on or off the above feature