Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Open timeline / comp window w a script?

  • Open timeline / comp window w a script?

  • rich helvey

    July 23, 2008 at 8:01 pm

    Is it possible to have a script open the Composition and timeline window panels with a script?

    The closest I’ve gotten is through an undocumented command:

    thisComp.ramPreviewTest(something,viewport scaling, something);

    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.

    Am I SOL?

    Thanks,
    -Rich

  • Lloyd Alvarez

    July 24, 2008 at 7:28 pm

    Unfortunately there is no way to open a comp through scripting, but what exactly are you trying to do? There’s other ways to work with comps without having to open them..

    -Lloyd

    https://aescripts.com

  • rich helvey

    July 24, 2008 at 8:09 pm

    Never mind. I figured out a way to do it.

    -Rich

  • rich helvey

    July 24, 2008 at 8:19 pm

    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.

    -Rich

  • Lloyd Alvarez

    July 24, 2008 at 9:17 pm

    mind sharing with the class?

    https://aescripts.com

  • rich helvey

    July 24, 2008 at 9:27 pm

    Hehe, I figured I’d let you squirm a bit.

    OK, so my solution goes back to my original idea of using ramPreviewTest.

    Here’s the function I’m using:

    function openCompPanel(thisComp)
    {
    // 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.
    thisComp.ramPreviewTest(“”,1,””);

    // 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.

    -Rich

  • Lloyd Alvarez

    July 25, 2008 at 2:01 pm

    very interesting, didnt know about this ramPreviewTest.. good to know.

    thanks for sharing,

    lloyd

    https://aescripts.com

Viewing 1 - 7 of 7 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy