Activity › Forums › Adobe After Effects Expressions › Auto position animation at the end of the composition
-
Auto position animation at the end of the composition
Avinash Ramanath updated 5 years, 11 months ago 2 Members · 18 Posts
-
Avinash Ramanath
May 2, 2017 at 10:27 amHi,
I have many placeholders inside render comp. placeholders duration will be different for each placeholder. I want an expression that will automatically move the position of placeholders from [960,540] to [960,-540] in the last 20 frames of the placeholder comp.Thanks
-
Steve Sierra
May 2, 2017 at 11:48 amHi again,
I think you could put this in the placeholders’ positions :
m = timeToFrames(thisLayer.source.duration) + timeToFrames(thisLayer.inPoint) – 20;
n = framesToTime(m);
p = framesToTime(20);
y = ease(time ,n, n+p, [960, 540], [960, -540]);if(time>n){
y
}else{
[960,540];
}Cheers !
-
Avinash Ramanath
May 4, 2017 at 4:55 amSteve, need one more alteration. What should the expression be if it needs to have different in and out animations
example:in – from [960,-540] to [960,540]
out – from [960,540] to [960,-960]Thanks
-
Steve Sierra
May 4, 2017 at 11:36 amHi,
I think this is what you need :
a = thisLayer.inPoint;
b = timeToFrames(a);
m = timeToFrames(thisLayer.source.duration) + b – 20;
n = framesToTime(m);
p = framesToTime(20);
x = ease(time ,a, a+p, [960, -540], [960, 540]);
y = ease(time ,n, n+p, [960, 540], [960, -960]);if(time = b){
x
}else{
if(time>n){
y
}else{
[960,540];
}
}Cheers 😉
-
Avinash Ramanath
May 4, 2017 at 12:03 pmOnly out animation is happening, but in animation is not happening.
-
Steve Sierra
May 4, 2017 at 12:33 pmOups…
It’s supposed to be :
a = thisLayer.inPoint;
b = timeToFrames(a);
m = timeToFrames(thisLayer.source.duration) + b – 20;
n = framesToTime(m);
p = framesToTime(20);
x = ease(time ,a, a+p, [960, -540], [960, 540]);
y = ease(time ,n, n+p, [960, 540], [960, -960]);if(time = a){
x
}else{
if(time>n){
y
}else{
[960,540];
}
}I put b in the if condition instead of a… interchanged those varibles at the last minute 😉
-
Steve Sierra
May 4, 2017 at 12:56 pmYou’re right…
I don’t know why. I’m only getting the In animation.I’ll lokk into it when I have some time, unless someone else helps you out.
Good luck !
Reply to this Discussion! Login or Sign Up
Log in to reply.