ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Maintaining distance between layers, even if I scale the center one

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Dan Ebberts
Re: Maintaining distance between layers, even if I scale the center one
on May 27, 2018 at 11:50:01 pm

Something like this should work for the upper:

gap = 25;
L = thisComp.layer("Middle Text");
r = L.sourceRectAtTime(time,false);
hisUL = L.toComp([r.left,r.top]);
r2 = sourceRectAtTime(time,false);
myLR = toComp([r2.left+r2.width,r2.top+r2.height]);
value + [0,hisUL[1] - myLR[1]-gap]

and something like this for the lower:

gap = 25;
L = thisComp.layer("Middle Text");
r = L.sourceRectAtTime(time,false);
hisLR = L.toComp([r.left+r.width,r.top+r.height]);
r2 = sourceRectAtTime(time,false);
myUL = toComp([r2.left,r2.top]);
value + [0,hisLR[1] - myUL[1]+gap]


Dan



Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]