Pages

Basic MEL script I use to set up my scenes/workspace

Wednesday, March 30, 2011
In order to save time I created a script to handle some of the things I always change with any scene I create or ones that I open if they are missing this stuff.

The script first sets the animation play time and end time to 120 frames (instead of the default 24 and 48) and then creates an extra camera (ShotCam) that I use to frame my scene for render or playblasts. This lets me play around in perspective view and have a second window up on my other monitor with the ShotCam view with everything hidden except the character or scene elements (that is not in this script).

So nothing fancy but in case it might be useful to someone here it is:


//Basic Scene Setup. This will set your playtime and end time to 120 frames. It also creates a ShotCam with the translate settings below. Alter the values to suit your preferences. (Created by West Decker)

playbackOptions -e -min 1 -max 120;

camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 1 -horizontalFilmAperture 1.4173 -horizontalFilmOffset 0 -verticalFilmAperture 0.9449 -verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.1 -farClipPlane 10000 -orthographic 0 -orthographicWidth 30 -panZoomEnabled 0 -horizontalPan 0 -verticalPan 0 -zoom 1; objectMoveCommand; cameraMakeNode 1 "";
rename "camera1" "ShotCam";
setAttr "ShotCam.translateX" 23;
setAttr "ShotCam.translateY" 28;
setAttr "ShotCam.translateZ" 56;
setAttr "ShotCam.rotateX" -15;
setAttr "ShotCam.rotateY" 20;

1 comments:

Max GariƩpy said...

THanks for the script West! Will save a lot of time!

Post a Comment

 
Copyright © Reanimation
Blogger Theme by BloggerThemes Sponsored by Busy Buzz Blogging