ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Matching animated shape layer end positions with expressions

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nick Read
Matching animated shape layer end positions with expressions
on Dec 7, 2017 at 12:26:33 pm

Hello,

I am making a modular lower third kit, I have a shape layers' width (lower third box) controlled by the length of 2 text layers in a comp, with the shape resizing (from left centre) based on which text layer is wider.

I have animated a new shape layer (small ellipse) across the width of this box, but would like the end position of this new ellipse to automatically adjust according to the user changeable lower third box (driven by text width). This action also ideally happens some seconds into the comp, and there is also some existing keyframing of the text into position, but will remove if necessary in order to make this possible.

I think what I'm essentially trying to do is match a shapes positional keyframe at a point in time to a (in this case) scale value of another layer.

Is a null the answer to this? I hope this makes sense.

Here is a screenshot of the comp, and expression for the lower third box below.



This is a still preview of the composition



From a relative and very grateful noob!

Nick

s1=thisComp.layer("FIRST NAME GOES HERE");
s2=thisComp.layer("THEN TYPE WHAT YOU WANT ALONG THE BOTTOM");
w1=s1.sourceRectAtTime().width;
w2=s2.sourceRectAtTime().width;
padding=100;
x = Math.max(w1,w2);
y1=s1.sourceRectAtTime(time-s1.inPoint,true).height;
y2=s2.sourceRectAtTime(time-s2.inPoint,true).height;
y=y1+y2;
[x+padding,y+padding]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]