PDA

View Full Version : Automatic playback range from camera


polysmith
02-15-2007, 04:49 PM
Hello All,

I'm not fluent in mel yet so I have not figured out how to make this common daily routine with a mel. I'd call it a camera switcher. I wanted to ask how other people thought would be the best way to make this mel. and where to store the variables.

The idea is that I could make a mel that I select a camera to view, click a mel on the shelf or hotkey it and - the panel changes to this camera and the playback range I have listed somewhere (like in the camera shape node notes) is automaticly is set.

First off, my process (open to advise here too).
When animating a story I have several cameras, like a [Wide, Medium, and Close-up] or with big projects [ shot_01, s02, s03, s04, ... s27, ect.]. Breaking the project into multiple files when there is alot of animation, not one file for each camera. For each maya file I make a render batch txt file of what camera name renders what payback range.

What mel I have are these 2 bits ;

look through selected
//modelPanel4 is normally the persp view
lookThroughSelected 0 modelPanel4;
string $selectedObject[] = `selectedNodes -dagObjects`;
// you will look through the first object selected
lookThroughModelPanelClipped $selectedObject[0] modelPanel4 0.001 1000;
lookThroughModelPanelClipped pCube1 modelPanel4 0.001 1000;


and set playback range (no use of variables yet)
playbackOptions -min 6 -max 29 ;

Sorry if this has been talked about already and thanks ahead of time.

arcsecond
02-16-2007, 12:42 AM
I have built something like this. Not exactlly though. We prefer to work with one camera per scene so that simplifies the situation somewhat.

Check out :
http://www.arcsecond.net/scripts/general/jpSetSceneRanges.mel

this script is also needed to run the above one:
http://www.arcsecond.net/scripts/general/jpPadNumber.mel

I store the frame range information in a file on the server but I suppose there's no reason you can't store it with the camera itself either in the notes or as extra attributes. I would probably go with extra attributes on the node as that would make it easier to include into other scripts later on. Say you wanted to write a script that listed the cameras in your scene and read their start and end ranges and set off a batch render for each camera.

Hope this helps.
-James

CGTalk Moderation
02-16-2007, 12:42 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.