Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions importing numbered frames into AE?

  • Dan Ebberts

    November 18, 2012 at 3:31 am

    Depending on the format of the text (comma or tab delimited?) you can probably do it with a fairly simple script. I would guess you’d set it up so that the script would assume the slider is selected, prompt you to navigate to the text file, read the file, parse the numbers, and create keyframes on the slider. All very do-able.

    Dan

  • Ben Wolfinsohn

    November 18, 2012 at 3:42 am

    or is it easier if i just copy the number and past them into a expression or into the keyframes? but I have no idea how to do ether of those things. they are separated by returns now, but i could change to another formate if better.

  • Dan Ebberts

    November 18, 2012 at 3:54 am

    You could probably paste it into an expression. What should the expression do with the numbers?

    Dan

  • Ben Wolfinsohn

    November 18, 2012 at 4:41 am

    right now i have a timeremaped layer that has an expression pointing it to a slider so I can move the timeremaped layer back and forth between the first 8 frames easily.

  • Dan Ebberts

    November 18, 2012 at 6:11 am

    I’m still not sure what you’re after exactly, but this expression will give you a new value from the comma-delimited text string each frame:

    txt = “3,2,8,6,7,0”;
    f = timeToFrames(time);
    s = txt.split(“,”);
    parseInt(s[Math.min(f,s.length-1)])

    Dan

  • Ben Wolfinsohn

    November 18, 2012 at 6:52 pm

    not sure if that will work. here’s a really simple version of what I’m trying to do –

    if I have a comp that is 12 frames long.
    I have only 1 sold layer in it.
    I only want to change the opacity of that layer to the values below in order.
    2,6,3,8,1,5,3,1,4,5,4,2
    I do not want to manually have to frame forward to each frame and adjust it, just want to be able to copy and paste those number into the layer somewhere.

    what might be the code/expression and where and how exactly might I put it? sorry, I’m brand new to doing expressions.

    thanks!

  • Dan Ebberts

    November 18, 2012 at 7:04 pm

    The same expression should work for opacity:

    txt = “2,6,3,8,1,5,3,1,4,5,4,2”;
    f = timeToFrames(time);
    s = txt.split(“,”);
    parseInt(s[Math.min(f,s.length-1)])

    Just apply it to the opacity property of the solid.

    Dan

  • Ben Wolfinsohn

    November 18, 2012 at 7:10 pm

    oh wow. that totally works. thanks!

  • Ben Wolfinsohn

    November 19, 2012 at 1:10 am

    another question –

    I have a null object with a slider.
    I have solid object layer with a checkbox I added to it and it is pointing to that null slider.
    I want the check box to turn on when the slider slides to 1. when the slider slides to any other number I want it to turn off.
    the current expression in my solid with the checkbox is –
    comp(“head contol”).layer(“head contols view 1”).effect(“head-turn”)(“Slider”)

    any ideas?
    thanks

  • Dan Ebberts

    November 19, 2012 at 1:50 am

    Try this:

    comp(“head contol”).layer(“head contols view 1”).effect(“head-turn”)(“Slider”) == 1

    Dan

Page 1 of 2

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