Highlighted

Using a csv to change text every frame

New Here ,
Mar 19, 2020

Copy link to clipboard

Copied

I am trying to make an animation where I have a data file that I'd like to be the one to control what text appears for each frame.  Is this possible? I've watched a lot of tutorials for using json to set data, but I can't figure out how to have it change which record/line it pulls from as time goes on.

 

As an added bonus, I would like to be able to tell AE to "turn on" a layer at a certain frame based on the data in my data file (using layer name and frame value).  I'm guessing this is also not possible, but figured I would throw it out there as well. 

 

If AE can't handle this - any ideas as to what program might be able to do this? Would really love to save myself from having to manually type out 4,275 frames worth of data when I already have it in a spreadsheet. Thanks in advance!

Topics

Expressions, Scripting

Views

254

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Using a csv to change text every frame

New Here ,
Mar 19, 2020

Copy link to clipboard

Copied

I am trying to make an animation where I have a data file that I'd like to be the one to control what text appears for each frame.  Is this possible? I've watched a lot of tutorials for using json to set data, but I can't figure out how to have it change which record/line it pulls from as time goes on.

 

As an added bonus, I would like to be able to tell AE to "turn on" a layer at a certain frame based on the data in my data file (using layer name and frame value).  I'm guessing this is also not possible, but figured I would throw it out there as well. 

 

If AE can't handle this - any ideas as to what program might be able to do this? Would really love to save myself from having to manually type out 4,275 frames worth of data when I already have it in a spreadsheet. Thanks in advance!

Topics

Expressions, Scripting

Views

255

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Mar 19, 2020

Copy link to clipboard

Copied

As typically happens, after giving up the search and asking for help, I found the answers. 

 

Thanks to the solution here - except use "else if" for all the subsequent variations.  e.g.

 

thisFrame=timeToFrames(t=time+thisComp.displayStartTime,fps=1.0/thisComp.frameDuration,isDuration=false);

if (thisFrame==0){text.sourceText = 'Shaky';}

else if (thisFrame==1){text.sourceText = 'Wake';}

else if (thisFrame==2){text.sourceText = 'A Tire';}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Mar 19, 2020

Copy link to clipboard

Copied

Looks like your question was mostly answered back in 2007.  If only we had a time machine!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...