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

Script to generate a mask, and recompute it whenever needed

Participant ,
Mar 08, 2021 Mar 08, 2021

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?

TOPICS
Scripting , SDK
286
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
Advocate ,
Mar 08, 2021 Mar 08, 2021

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?

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
Participant ,
Mar 08, 2021 Mar 08, 2021
LATEST

Interesting. I didn't know expressions could do that. It sounds like I need to learn more about expressions! Thanks for the tip.

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