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

SDK: Mask and checkout layer

Explorer ,
Oct 04, 2023 Oct 04, 2023

Copy link to clipboard

Copied

Hello,

I've developed a plugin that checkouts a layer and displays it on screen. The plugin applies the same transforms as the original layer (position, scale, rotation... even 3D with OpenGL).

 

The problem:

When I draw a mask on the solid on which the effect is applied, and I move the mask in the composition, the whole checkout layer moves as well (see images)! Whereas if I apply the mask on the original layer and move it through the comp, the mask will act as "a window", and will only display the section of the layer corresponding to the mask.

- What am I missing here ? 

- Also, why does After Effects display a rectangle as the output and not drawing only the pixels contained within the mask ?

 

Thank you so much

 

TOPICS
SDK

Views

240

Translate

Translate

Report

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 ,
Oct 08, 2023 Oct 08, 2023

Copy link to clipboard

Copied

LATEST

you need to account for pre_effect_source_origin_x and pre_effect_source_origin_y.

when a layer is masked, AE crops the passed buffer to the layer's bounds. so if you ignore the offset it would seem the layer travels to stick to the upper left corner of the mask bounding box.

Votes

Translate

Translate

Report

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