-
guess shape layer content width?
hiya!
I’m trying to automate some shape animations proccess following a slider’s values from a null called “control”.
I have a bunch of layers, and on every layer a different letter, which is a shape layer. I masked the layer itself, but I’m moving the letter (so the content shape’s position) from left (out of the mask) to right(the original position, where the mask is)
I’ve everything working, but I’d like to know if the line “init” could have an expression in which it’s always the final position minus the content shape’s size.. now I’m doing it by hand depending on the width of the letter, but I’m wondering if it could be done more universalthis is the (dirty, but working) expression applied to the letter (which is a shape layer)’s content position
t = time-inPoint;
L=thisComp.layer("control");
s = L.effect("move")("Slider");
ende=content(1).transform.position[0];
init=ende/1.5
v0 = s.valueAtTime(L.inPoint);
v1 = s.valueAtTime(L.inPoint+t);
po=v1-v0;
j=linear(po,0,100,init,ende);[j,value[1]]
I hope it could be done! I’ve tried several things, but never worked…
thanks!