PDA

View Full Version : Set the Timeline range to the Background Footage range automaticly?


PsychoSilence
09-03-2006, 09:29 PM
Hallo Community,

i want to write a script that sets the timeline range to the camera keys.

the background: we have tracked cameras (every frame is keyed...) and background plates as tga-sequences. now i want to write a script that sets the camera range to the imagecount of the background plate automaticly!

example: i have a backgroundplate that counts 183 frames. now i want the script to look after the footage and set the frame range to 183.

now you think "why doesnŽt he do this by hand?!?". The reason is i want that script to e executed on load of a max file. so that the animator doesnŽt have to think about that issue. i want to reduce the source error...

hope someone can help me

regards

anselm

davestewart
09-04-2006, 11:01 AM
This should get you started:


-- to set the animation range to the environment duration
v = environmentMap.bitmap.numframes
animationrange = (interval 0f v)

-- to set the animation range to the camera's last position key
k = $Camera01.pos.controller.keys
v = k[k.count].time
animationrange = (interval 0f v)


Cheers,
Dave

PsychoSilence
09-04-2006, 11:17 AM
hy dave!

iŽll give it a try definetly! hopefully i get that thing done just in time :(

PsychoSilence
09-05-2006, 03:03 PM
Thanks to Dave i got it! in combination with the autoexec script i force the timelines to be just as long as they have to :)

cheers

anselm

Aearon
09-10-2006, 11:47 AM
hey ansi, how's it hanging ;)


there's a script called "Set Animation Range To Key Range" in the soulpix scripts, if you want to take a look

CGTalk Moderation
09-10-2006, 11:47 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.