PDA

View Full Version : Scene Split Tool


jiggyfresh
06-05-2007, 01:40 AM
Any thoughts and suggestions are welcome,

Say we have a scene file with two shots (read: cameras). I want to use camera 1 for frames 1 - 24, and then have another shot from frame 25- 48. there are objects in the scene with keyframed animation, and the cameras are keyframed as well.

The end goal is to have 2 new scene files, one with frames 1 - 24 and camera 1, and a second with frames 25 - 48 looking through camera 2.

I believe I can just query/set the start and end frames in the timeslider and then use:
"file -rename ((dirname(`file -q -sn`))+ "/exported_shot.ma");
file -save -type "mayaAscii";"
And thus get the basics of what I want. I'll have both cameras and out-of-shot animations in both scenes. In fact, the scenes will be identical except the timeslider will have moved. So this isn't exactly what I need.

What if I want it so that the second scene goes from a native 1 - 24 frame time slider as well, instead of 25 - 48 as originally?

So I'd have 1 scene (say: "shot1.ma") with frames 1 - 24 of the original scene and camera 1. I would also have a second scene ("shot2.ma") with frames 25 - 48 of the original scene, but now on the time slider from frames 1 - 24.

I'm wondering how I can move all of the keyframes for the camera, and all objects in the scene down 24 frames so they line up at position 1 of the time slider. Or maybe that isn't even the best way to do this.

Knowing the camera of the shot, and the frame range of the shot, how do I make the first frame of the shot into the first frame in the scene before I rename and save it out? Thanks in advance.

dr.rastaman
06-18-2007, 09:56 AM
I didn't really test it, but I think something like this should work:

string $allAnimCurves[]=`ls -type animCurve`; //query all animated values
for($ac in $allAnimCurves){
keyframe -edit -relative -timeChange (-24) -time "25:48" $ac; //move thekeyframes
}

jiggyfresh
06-18-2007, 07:58 PM
thank you! what i ended up doing was exactly that: selecting all animated curves and useing the `keyframe` command to slide them down the slider for each shot.

CGTalk Moderation
06-18-2007, 07:58 PM
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.