Skip to main content
Inspiring
April 23, 2024
Answered

How to play a desired layer from its first keyframe using the Dropdown Menu Control effect.

  • April 23, 2024
  • 2 replies
  • 326 views

Hello!

I'm currently working on exporting a MOGRT (Motion Graphics Template) from After Effects for use in Premiere Pro and I'm facing some challenges. I've come here seeking help from skilled individuals.

The system I want to implement is as follows:

  1. There is a Null layer with a Dropdown Menu Control (effect renamed to "Action").
  2. "Action Jump": A null layer that should play from its first frame when selected in the dropdown menu.
  3. "Action Down": Another null layer that should also play from its first frame when selected in the dropdown menu.

The goal is to have the selected layer (either "Action Jump" or "Action Down") start playing from its first frame when chosen from the dropdown menu on the Option null layer.

Is this possible? If so, how should I construct the expressions?

Thank you!

This topic has been closed for replies.
Correct answer Mylenium

You can't. There is no way to track an onChange() event and that is pretty much that. A dropdown menu can really only change a static value inside an expression. That being the case, it would probably be simpler to just have duplicate layers with the animation on and toggle their visibility, if at all.

 

Mylenium

2 replies

Dan Ebberts
Community Expert
Community Expert
April 23, 2024

If you control the menu with keyframes, then you should be able to use something like this for time remapping:

myID = 1;
m = thisComp.layer("Null 1").effect("Action;")("Menu");
t = 0;
if (m.numKeys > 0){
  n = m.nearestKey(time).index;
  if (time < m.key(n).time) n--;
  if (n > 0){
    if (m.valueAtTime(m.key(n).time) == myID){
      t = time - m.key(n).time;
    }
  }
}
t

It may not work exactly the way you want, so it may need some fine-tuning. You would edit the first line for each successive action (myID = 2, for example).

 

Mylenium
MyleniumCorrect answer
Legend
April 23, 2024

You can't. There is no way to track an onChange() event and that is pretty much that. A dropdown menu can really only change a static value inside an expression. That being the case, it would probably be simpler to just have duplicate layers with the animation on and toggle their visibility, if at all.

 

Mylenium