Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using a csv to change text every frame

New Here ,
Mar 19, 2020 Mar 19, 2020

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
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2020 Mar 19, 2020

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';}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 19, 2020 Mar 19, 2020
LATEST

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

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