Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
ochikazawa
Topic Author
Posts: 2
Joined: Sun Mar 03, 2013 9:13 pm

Ease Expression with more than 2 values

Mon Apr 16, 2018 5:55 am

Hi all, I've imported a simple CSV file into my project so that I can try and animate a line graph. I want to be able to have it setup in a way where all I have to do is change the values in the spreadsheet and the animation will update. I've managed to get it to read the different values but it's animating like hold keyframes due to the fact that I'm using a Math.floor. I set up a slider to be the "time control" so that I could animate it to progress through the different values. I know that the Math.floor is what's messing me up here but it's the only way I knew to get integers so that I could reference the array (CSV's set up columns like arrays sort of). 

Ideally I could just do an Ease expression that could go between 5 different values. That would be the most simple way I could think of but I just don't know if it's possible. I'm trying to make this as easy of a setup as possible for future editing. This is the current expression I have on a shape layer that represents a point on the graph. 


x=Math.floor(thisComp.layer("Time").effect("Slider Control")("Slider"));
y=footage("Test - Sheet1.csv").dataValue([4,x]);

[value[0],y]

Below is an image of the spreadsheet and a link to the project file. 

Spreadsheet Image

Project File

Who is online

Users browsing this forum: No registered users and 3 guests