Copy link to clipboard
Copied
I'm working on a script that will generate a mask automatically, and rebuild the mask whenever the enclosing layer changes. For example, suppose my plugin generates a circular mask. I want it to recreate the mask whenver the layer size changes, so that my circular mask doesn't turn into a squished oval.
Do you know if there is a way for a plugin to be notified whenever a layer changes?
Copy link to clipboard
Copied
Unfortunatelly, but AE does not provide any DOM listeners for scripts, i.e. there's no way for a script to know if anything changed in AE interface, without manually forcing your script to re-read the data.
Not sure about native C++ plugins though.
However, if it's a mask, why not use createPath() expression, that recalculates when layer size changes instead?
Copy link to clipboard
Copied
Interesting. I didn't know expressions could do that. It sounds like I need to learn more about expressions! Thanks for the tip.