Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to Apply an Expression to Multiple Layers at Once Using Automation Blocks

Community Beginner ,
Feb 14, 2025 Feb 14, 2025

How can I apply an expression to multiple layers at once using Automation Blocks? I don't like manually copying and pasting the expression to each layer. I also don't want to open layers and select all properties manually. Instead, I want to enter the property name in a dropdown menu or input box and apply the expression to the selected layers' properties.

 

Example:
I select multiple layers and run the script. A dialog box opens where I enter the property name, such as "position" and the expression. Then, the script applies the expression to the specified property for all selected layers.

 

Has anyone done something similar or have suggestions on how to achieve this? I’d appreciate any guidance. Thanks in advance! 😊

TOPICS
Expressions , How to , Resources , Scripting
287
Translate
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

correct answers 1 Correct answer

Community Expert , Feb 14, 2025 Feb 14, 2025

Here is a second variant of the script, where you can choose in a dropdown, to which property you want to apply the expression:
Screenshot 2025-02-14 at 21.11.04.pngexpand image

 

download (also in Community Library):

Layer Properties/Expressions/Apply Expression to Any Transform Property of All Selected Layers.xml

Translate
Community Expert ,
Feb 14, 2025 Feb 14, 2025

Here is a block script, which applies an expression to the Position property of all selected layers of the active comp.

You can modify the block code easily to use another property instead of position - just select another property (no matter on which layer exactly) and click the "refresh" icon as indicated in the screenshot.

 

Screenshot 2025-02-14 at 20.50.59.pngexpand image

I made the block code such that you can enter the actual expression code in the input panel. Of course, you can also use a popup instead of enter the expresssion code directly inside the block code.

I just added this block script to the Community Library 

here is the direct download to the block script file:

 Layer Properties/Expressions/Apply Expression to Position of All Selected Layers.xml

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
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
Community Expert ,
Feb 14, 2025 Feb 14, 2025

Here is a second variant of the script, where you can choose in a dropdown, to which property you want to apply the expression:
Screenshot 2025-02-14 at 21.11.04.pngexpand image

 

download (also in Community Library):

Layer Properties/Expressions/Apply Expression to Any Transform Property of All Selected Layers.xml

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
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
Community Beginner ,
Feb 14, 2025 Feb 14, 2025
LATEST

It's working great! Thanks so much for taking the time to create this—it was really helpful.

Translate
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