When you author a Motion Graphics template, it is common to keep the MOGRT flexible for editors using them in Premiere Pro by giving sliders and checkboxes to customize properties. A slider control is helpful when you have a continuous range without the need to specify an exact value. Instead, you just want to increase or decrease a behaviour. For example, to make something smaller or bigger, move something left or right, make something faster or slower. 

Checkboxes are useful when you have specific options and you want the editor to select from those. For example, you can have checkbox in order to turn something on or off. Often you also use checkboxes to switch between different designs of a MOGRT. For example, you want to give the editor in Premiere Pro the option to use the mogrt either with a square shape or with an ellipse shape. You can create a checkbox, one for square, one for ellipse, and the editor checks one or the other. Or you can create a slider, moving the slider to the left gives you the square, moving slider to the right gives you the ellipse.

However, for more complex workflows with multiple options, using sliders or checkboxes is not always intiuitive, and is time consuming. You can use the Dropdown Menu Control which is especially helpful for authors of Motion Graphics Templates and editors in Premiere Pro as the menu makes it easier to have more control options and a simpler experience to adjust parameters.

For more information, see Use Motion Graphics templates in Premiere Pro.

Notă:

This feature specifically intends to make Mogrts authoring and consumption better, but it is also helpful for workflows outside MOGRT creation.

Set up the Dropdown Menu Control effect

Dropdown Menu Control is part of Expression Controls. Follow these steps to set it up for you:

  1. Select Effect > Expression Controls > Dropdown Menu Control to hook up properties of layers to a dropdown menu. The effect is added to the Effect Controls panel.

  2. In the Effect Controls panel, click Edit. The Dropdown Menu Control comes with a default menu with three items: Item 1, Items 2, Items 3.  Use this to name your menu options. These can be changed to anything such as Design A, and Design B. You can also add more options to the menu with the + - icon.

To understand the uses of this effect, consider the following workflow examples:

  • Allow the editor in Premiere Pro to choose from a limited selection of color themes - The dropdown menu could have items like Colorful, Dark, Neon.
  • Allow editor in Premiere Pro to have different positions of the Mogrt, for bugs or lower thirds - The dropdown items could be Left or Right.
  • Allow Mogrt user to switch between different designs of the Mogrt. A TV show could have different categories for an Intro - the cooking design, the animal design, the children design. You could switch between different designs which affect a whole set of properties at once such as color, animation, and time. 
  • An editor using a MOGRT could use a dropdown to select different animation/design options by name, rather than by number with a slider control.

How to write expression for Dropdown Menu Control

The menu items in the Dropdown Menu Controls dialog refer to indexes, and when you enter a value in them, After Effects does not read or return the menu item strings in expressions but their indexes. The first menu item is 1, the second item is 2, and so on.

Example 1:

If you have a dropdown menu with the following menu items in this order:

  1. Monday
  2. Tuesday
  3. Wednesday

Monday is index 1, Tuesday is index 2, as long it is the second item in the list. If you rename Tuesday to anything else, the expression does not break since it is still index 2.

Here a simple example for using source text with a Dropdown Menu Control:

x = comp("CompName").layer("LayerName").effect("Dropdown Menu Control”)(“Menu”);

if (x == 1) {

text.sourceText = (“Monday”);

if (x == 2) {

text.sourceText = (“Tuesday”);

}

if (x == 3) { 

text.sourceText = (“Wednesday”);

}

Example 2:

If you have a dropdown menu with the following items in this order:

  1. Spooky
  2. Fun
  3. Radical

Fun will be index 2, as long it is the second item in the list. However, if you rename Fun to Funny, the expression does not break since it is still index 2.

Example 3:

Define the source text of a text layer and reference it to the menu items in the Dropdown Control:

var listItems = [
"Lambs",
"Pups",
"Not a thing",
];
var dropDownValue = effect("Dropdown Menu Control")("Menu").value;
listItems[ dropDownValue - 1 ];

 

var x = effect("Dropdown Menu Control")("Menu").value;if ( x === 1 ) {
"Lambs";
} else if ( x === 2 ) {
"Pups";
} else {
"Not a thing";
}

 

x = effect("Dropdown Menu Control")("Menu").value;
switch (x) {
case 1 : "dog";
break;
case 2 : "cat";
break;
default : "default" }

Example 4:

Define the color of a layer and reference it to the menu items in the Dropdown Control:

dropDownIndex = thisComp.layer("Null 2").effect("Dropdown Menu Control")("Menu").value;
switch ( dropDownIndex )
{
case 1: hexToRgb("FF3211");
break;
case 2: hexToRgb("CC1234");
break;
default: hexToRgb("BBB001")
};