-
Linear expression linked to keyframes in another comp
I need to link a linear expression to the 3rd and 4th keyframes of a property on a different comp. the layer where the linear will be applied is nested in the comp that has the layer with the keyframes.
I have successfully done this in the past, but this now it’s not working, returning an error that says that ctrl.valueAtTime is not a function. ctrl is the name of a variable that contains the layer with the keyframes, as you can see below:
c=comp("expertAssist_After");
ctrl=c.layer("NULL CONTROL").transform.position[1];
l=c.layer(thisComp.name);
x=ctrl.valueAtTime(time+l.startTime);
k3=c.layer("NULL CONTROL").transform.position.key(3).value[1];
k4=c.layer("NULL CONTROL").transform.position.key(4).value[1];
linear(x,k3,k4,0,100)This is an old expression and I don’t know if it’s broken because of the javascript engine vs legacy ExtendScript, it does not work on neither.
Any help is greatly appreciated.