-
pulling text source as a file value
I have a file in the project named Anniversaries.csv
This code works:
file = "Anniversaries.csv";
col = effect("Column")("Slider");
row = thisComp.layer("name").effect("Row")("Slider");
footage(file).dataValue([col,row])But this does not:
fileSource = thisComp.layer("csv").text.sourceText;
file = fileSource;
col = effect("Column")("Slider");
row = thisComp.layer("name").effect("Row")("Slider");
footage(file).dataValue([col,row])it’s pointing to a layer who’s source text is currently “Anniversaries.csv”
It says it can’t find the footage named ‘”Anniversaries.csv”‘
So it’s adding single quotes? I’m not much of a scripter/programmer, so I don’t understand how to fix this.The reason why, is sure to get asked. I’m changing that source text via the Essential Graphics panel so that I can make just a single comp for the next, which is 3 lines found in the 3 columns of that CSV file.
But I have multiple CSV files, so want to be able to change them on the fly. Sure, I could combine them all into one, just like I could not do this at all and just manually type all 246 entries and animate them all one at a time. But lets agree that being able to call up a different CSV file makes sense in my case. Also, this would allow me to send this over to premiere as a mogrt if I wanted. (sorry, I seem to always get the answers that aren’t answers and telling me I should just do something differently, even thought it isn’t flexible and only works in this one specific case)