Tech Tip Tuesday: Editing Image Plane Expressions

Using image planes with an image sequence is useful for animation reference, but you don’t get much control over them in Maya. If you want to do some basic video editing without leaving Maya, there’s a couple fun ways you can hack the expression.

If you have an image plane selected, right click the purple Image Number attribute in the attribute editor and select “Edit Expression”. A normal expression looks like this:

imagePlane1.frameExtension=frame

Which just assigns the current frame to the frame extension of the file. If you want to offset the clip in the expression editor, you can just add or subtract from that frame number.

imagePlane1.frameExtension=frame+7

You can also change the framerate by multiplying the “frame” value. Multiplying by 2 will speed it up twice as fast, for example. If you have something that was shot at 30 fps but you want it to drop frames to match your scene’s 24 fps playback, you can do this:

imagePlane1.frameExtension=int(frame*30/24)

You can also do some basic editing. To reverse a 48 frame clip, try this:

imagePlane1.frameExtension=(frame*-1)+48

Or say you want to cut 30 frames out of your clip at frame 50. You can accomplish that like so:

float $f = frame;
if (frame>50) $f+=30;
imagePlane1.frameExtension=$f;

Finally, if you want to hold frame 15 for 8 frames, it’s similar:

float $f = frame;
if (frame>15+8) $f-=8;
else if (frame>15) $f=15;
imagePlane1.frameExtension=$f;
Share Button
This entry was posted in Maya, MEL, Tech Tip Tuesday. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *