which opens the window and waits for the script to stop before caching frames. Unfortunately it seems like the script is waiting for the ram preview to complete before moving on, so after effects hangs.
I don’t really want to do a ram preview anyways, but I can’t think of any other way to force the Comp window open.
I’m importing a bare-bones project a number of times, changing some text and other things in each project, then I want to open the text comps so the artist can make sure the text looks nice. Sure they could open the comps themselves, but we’re lazy enough to want the computer to do it for us. 🙂
Besides a figured out a way to do it, though it’s not the most elegant solution in practice.
OK, so my solution goes back to my original idea of using ramPreviewTest.
Here’s the function I’m using:
// remember the original work area duration
var duration = thisComp.workAreaDuration;
// temporarily set the work area to 2 frames
// I know, I should use the comp fps to calculate it,
// but I only work in NTSC 30 fps.
// Anything less than 2 frames makes AE barf
thisComp.workAreaDuration = 0.06;
// make a 2 frame ram preview which forces the comp window to open
// I don’t know the first and last arguments, and they may not want
// strings, but this works for me. The second argument is a scaling
// factor for the viewport. Use 0.5 for 50%, etc.
// Play nice and put things back the way they were
thisComp.workAreaDuration = duration;
It sure would be nice to have a much simpler way of doing this, though.