Skip to main content
Participating Frequently
March 21, 2024
Answered

Slider expression to adjust X position of two keyframes

  • March 21, 2024
  • 2 replies
  • 618 views

I need a slider to adjust the X position of the middle key frames.
I've looked online and tried lots of expressions with no success. 

I have created a split screen template for premiere pro but need the user to be able to adjust the x position of the footage when its in the split screen stage. One position for all won't work as the focal point on each footage might be slightly different. 

If a slider could offset or move the two keyframes in the middle that would be great and keep the easing applied would be a real win. Hopefully the pic helps show what I mean. 


This topic has been closed for replies.
Correct answer Adam24585301qycn

can you post your project, I think what you want can be done easily

2 replies

Mylenium
Legend
March 25, 2024

You cannot restrict anything in a MOGRT to only occur under certain conditions in Premiere. The AE container cannot see outside. The template has to be designed with the later use case in mind and the users have to be briefed to not use it incorrectly.

 

Mylenium

Participating Frequently
March 25, 2024

@Mylenium 

I found this expression that works for the midpoints but it doesn't have the easing I need. 
Is there a way to add easing that reflects a velocity in and out of 67,67? 

var sliderValue = thisComp.layer("Control").effect("Footage position")("Slider");
var startX = 960;
var endX = 960;

if (time >= key(1).time && time < key(2).time) {
    easeOut(time, key(1).time, key(2).time, startX, sliderValue);
} else if (time >= key(2).time && time < key(3).time) {
    sliderValue; // Maintain the slider value once it reaches the second keyframe
} else if (time >= key(3).time && time < key(4).time) {
    easeOut(time, key(3).time, key(4).time, sliderValue, startX);
} else {
    value[0];
}

easeOut(time, key(3).time, key(4).time, sliderValue, startX); } else { value[0]; }

Adam24585301qycn
Adam24585301qycnCorrect answer
Inspiring
March 25, 2024

can you post your project, I think what you want can be done easily

Mylenium
Legend
March 21, 2024

Don't bother. Simply apply a Transform effect or pre-compose and link this secondary correction.

 

Mylenium 

Participating Frequently
March 25, 2024

@Mylenium  How would the transform effect allow people in premier to adjust the position or anchor point only in the position when it's in splitscreen mode?