Activity › Forums › Adobe After Effects Expressions › importing numbered frames into AE?
-
importing numbered frames into AE?
Posted by Ben Wolfinsohn on November 18, 2012 at 1:24 amI have a text document with a string of numbers that I want to import into AE so I can apply those numbers to a slider. can I do this?
Dan Ebberts replied 13 years, 5 months ago 2 Members · 16 Replies -
16 Replies
-
Dan Ebberts
November 18, 2012 at 3:31 amDepending 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 amor 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 amYou could probably paste it into an expression. What should the expression do with the numbers?
Dan
-
Ben Wolfinsohn
November 18, 2012 at 4:41 amright 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 amI’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 pmnot 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 pmThe 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 19, 2012 at 1:10 amanother 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 amTry this:
comp(“head contol”).layer(“head contols view 1”).effect(“head-turn”)(“Slider”) == 1
Dan
Reply to this Discussion! Login or Sign Up