Skip to main content
Participant
January 18, 2021
Question

[Script] Update expressions when changing effect name.

  • January 18, 2021
  • 2 replies
  • 442 views

When I manually rename an expression control, the expressions that are linked to it update automatically.

But they don't when I rename it using a script.

Is there a way to solve this?

Thank you!

This topic has been closed for replies.

2 replies

Dan Ebberts
Community Expert
Community Expert
January 18, 2021

I just tried autoFixExpressions() and it seems to work:

var myLayer = app.project.activeItem.layer(1);
myLayer.property("Effects").property(1).name = "New Name";
app.project.autoFixExpressions("Slider Control","New Name");
Mylenium
Legend
January 18, 2021

You would need to address effects by there internal matchname nad keep track of the UI name in your own script with all the extra baggage that brings with it like the necessary string processing.

 

Mylenium