Instead, it is reading the index, meaning the hierarchal position of the menu item in the list (1, 2, 3, etc.). The item names of the Dropdown Menu are not read by the expression. In the Expression Editor, copy the following expression snippet: menu = thisComp.layer(“Null 1”).effect(“Dropdown Menu Control”)(“Menu”).value switch (menu) To move the layer’s Position based on our Dropdown Menu, we’re going to write a switch statement: Hit “p” on your keyboard for Position, and alt-click the stop-watch to the right of the word “position” to add an expression. Always rename the Dropdown Menu Control items to something that reflects the contents best.Ĭreate a new text layer. Click on Item 1 and rename it to “Bottom-Left.” Rename all other items to reflect their position. In the Effect Controls panel, select the Dropdown Menu Control and click on Edit… Click the “+” button in the top-right of the dialog box to add Item 4. Create a new Null Object and apply the Dropdown Menu Control effect to it ( Effect -> Expression Controls -> Dropdown Menu Control). In this example, we’ll learn how to reposition a layer to four different positions on the screen, like in the GIF above.Ĭreate a New Composition with dimensions 1920x1080px. The new Dropdown Menu Control is appropriate for selection from a limited number of options. Sliders are appropriate for ranges of minimum and maximum values, such as the padding of a text box. When designing several options in a MoGRT, After Effects 17.0 has a new feature to familiarize yourself with.Ĭheckboxes are appropriate for On/Off states, such as flipping on or off the stroke of a text layer. MoGRT creators have long used Sliders for toggling between multiple designs. More information on expressions for text properties can be found at the HelpX page. Using “.style” is the same as using “.getStyleAt(0).” These techniques just scratch the surface of what is possible with text expressions. In this case, “.getStyleAt(0)” is getting the style of the character “P” because its character index in the word “Parent” is 0. Here is another way to write the expression and achieve the same result: style = thisComp.layer(“Parent”).(0) tText(thisComp.layer(“Parent”).text.sourceText) īy using “.getStyleAt()”, you are getting the style of a particular character index at a particular time. Once set up, the second text layer will copy all text style properties and the Source Text from the first text layer. Hit Enter in the Expressions Editor to add a third line, and type in: tText( parentText ) Now we’re going to copy the text style properties from the “Parent” text layer via expressions. var parentText = thisComp.layer(“Parent”).text.sourceText var parentStyle = thisComp.layer(“Parent”). So we’ll create one variable named “parentText” to get the Source Text, and one variable named “parentStyle” to get the style of the Source Text. Coding best practice is to give meaningful, self-explanatory names when creating custom variables. In the Expressions Editor, we’ll create two variables with custom names. This one’s going to be more challenging, and we’ll have to combine our previous examples to accomplish it. You can copy and paste the expression from here: thisComp.layer(“Parent”). Forward Source Text & style However, the Source Text remains separate. The second text layer now copies the text properties (style) of the first text layer. In the Expressions Editor, simply add “.style” to the end of the expression. We’ll continue where we left off in the previous example. You can copy and paste the expression from here: thisComp.layer(“Parent”).text.sourceText Forward text style only Voila! The second text layer now copies the Source Text of the first text layer. For our example, we’ll name our layers “Parent” and “Child.” Pickwhip the Source Text of the second layer and drag it to the Source Text of the first layer. This method has been available in After Effects for a long time, and many enterprising creators use it in their MoGRTS.Ĭreate two text layers. Change the Expressions Engine from Legacy ExtendScript to JavaScript. Go to File -> Project Settings… and click on the Expressions tab. To start, double-check that the JavaScript Expressions Engine is enabled. In this blog post, we’ll cover three ways to use text forwarding expressions: MoGRTS containing text-style expressions will only be compatible with Premiere Pro 14.0 and higher. This feature enables you to keep font, size, and styling in sync across multiple text layers in After Effects and Motion Graphics templates.īear in mind that this is a new feature and will only work in After Effects 17.0 or above. You can now use expressions to control text styling as well as the text itself. Text layers have gained a massive upgrade in After Effects 17.0. Image source: Adobe Stock / Wavebreak Media. After Effects 2020: Express Yourself (and Your Text)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |