Expression Error - Recursive function
Hi,
So I have a little bit of a complicated comp with a lot of expressions animating it. The expressions are basically the same just with some values changed. Its quite a large comp but I have started working in a proxy the quater of the size but it hasn't helped. There aren't technically any expression errors but because of how many functions I have calling on one another AE keeps crashing and it pops up with an expression error occasionally and then disapears - "maximum call stack size exceeded, an expression was disabled as a result of the error".
The expression is below:
var markerIn = thisLayer.marker.key(1).time;
var x = thisComp.layer(index-1).position[0] - 1097;
var dur = 60;
linear(time, markerIn-dur, markerIn, x, x +177);
I basically have a master null animating the x position of 33 columns of content to the right over the course of 5 minutes. These columns as they move across then independantly need to move their x positions so the spacing between them changes when they reach certain points. I need each of the columns to read the position of the column before it and keep a consistent distance as well as change the distance when it reaches its certain point. My expression was working until I put it on all the columns I had in the comp (the first column, index 1, is the only one where the x position is "var x = position[0];"). I'm not sure how to write in a base case to stop the expression calling on itself, or if thats even the correct fix? I have a very basic understanding of expressions so any help would be great.
