Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Link a keyframe to slider control without affecting other keyframes

New Here ,
May 24, 2018 May 24, 2018

Copy link to clipboard

Copied

I'm designing a lower third for one of our brands and have an animated object with 3 keyframes.

I need to link the 3rd keyframe to a slider so my team can eventually adjust that value in Premiere with essential graphics without affecting the other keyframes.

What expression should I use to do this?

I imagine it would look something like this (with better syntax):

if ( key(index) = 3 ) {

key(index).value = effect("Slider Control")("Slider");

}else

key(index).value = value

TOPICS
Expressions

Views

3.3K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 13, 2018 Jun 13, 2018

Copy link to clipboard

Copied

Has anyone figured out a solution for this? I'm doing the same thing, only I want to link a specific keyframe to a sourceRectAtTime() for the lower third text layer.

Thanks.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 16, 2018 Jun 16, 2018

Copy link to clipboard

Copied

Almost right. You'll need a Linear expression in there to convert values. Here's a solution that will allow you to control the KF between 0 and the slider value, courtesy of the brilliant Dan Ebberts;

if (numKeys > 1){

t1 = key(1).time;

t2 = key(2).time;

v1 = 0;

v2 = effect("Slider Control")("Slider");

linear(time,t1,t2,v1,v2);

}else value

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2018 Dec 05, 2018

Copy link to clipboard

Copied

I like this expression,

But what can I do to link more than 2 keyframes to sliders?

Key1= slider1; key2=slider2; key3=slider3

etc.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

I'm able to make this work with 2 keyframes but not with anymore than that.

What happens if you have an in and out movement and you want to control both? 

I've tried adding 

t3 = key(3). time;

t4 = key(4). time;

v3 = effect("Slider Control")("Slider");

linear(time,t1,t2,t3,t4,v1,v2,v3,v4);

v4 = effect("Slider Control")("Slider");

linear(time,t1,t2,t3,t4,v1,v2,v3,v4);

But it's not working.

For context; I need these keyframes to be controlled with a slider so that I can make the motion editable in Premiere Pro

Any help would be super appreciated.

Thanks

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

Try replacing your last line with this:

if (time < t2)
  linear(time,t1,t2,v1,v2)
else if (time < t3)
  linear(time,t2,t3,v2,v3)
else
  linear(time,t3,t4,v3,v4)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

LATEST

yeah, it works

 

if(numKeys>1){
 
t1 = key(1).time;
t2 = key(2).time;
t3 = key(3).time;
t4 = key(4).time;
v1 = 0;
v2 = thisComp.layer("Comandos").effect("Comprimento")("Slider");
v3 = v2;
v4 = v1;
 
if (time < t2){
easeOut(time, t1, t2, v1, v2);
} else {
if(time < t3){
ease(time,t2, t3, v2, v3);
}else{
easeIn(time, t3, t4, v3, v4);
}
}
}else value
 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines