ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Script cannot set effect property value

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Anna Petkovskaya
Script cannot set effect property value
on May 3, 2019 at 10:42:35 am

I have a layer that has "Dust & Scratches" effect applied.
The layer has several Time Remap keyframes and I am applying this code on that Time Remap property like this:

effect("Dust & Scratches")("Threshold") = 60;

But I got error saying "Cannot apply value" - does anyone know why?


Return to posts index

Filip Vandueren
Re: Script cannot set effect property value
on May 6, 2019 at 7:55:57 am

You should apply an expression to the property you want to effect, not to time-remapping.

There is no way to set the value of property B from within an expression on property A.
An expression should always yield a value that is used instead of the current keyframed value of the property it is applied to.

if you want to know the value of the Threshold you would use a = effect("Dust & Scratches")("Threshold"); But you can only read that value, not set it.

So, if you want Threshold to always be 60 regardless of it's keyframes or time, simply apply this expression to it:

60;



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]