-
Trim path end to position of a null
Hi!
I’m making a graph that get its data from a json file.This is the setup:
I have a shape layer in a straight line that consists of 100 points.
Each point is attached to a null object.
Each null object’s Y position is driven by a json file:
eval("var SoMe=" + footage("SoMe_total.json").sourceText);followers = SoMe[0].jan20;
min = 0;
max = 3000000;max_movement= -1300;
newBaseline = 1836;
y = ((followers-min)/max)*max_movement + newBaseline;
[y]
For each month, a new number is added to the json file and the graph therefore continues.
As for now I have animated a trim path to the shape layer that is controlled by a slider.
min = 0;
max = comp("Main").layer("GRAPH CTRL").effect("FOLLOWERS GRAPH 2020-2028")("Slider");
if(numKeys > 1){ ease(time,key(1).time,key(2).time,min,max); }else{ max; }Here is my question. Since there are 100 null objects (100 points on the shape layer) and the slider goes from 0-100, is there a way to map the slider value (the trim path end) to go to the next null layer?
So if I type in 53 in the slider, the trim path end would go to the position of null 53…I hope i makes sense…
best regards,
Pontus
Sorry, there were no replies found.