Hey Folks. I'm writing an AE Effect Plugin that will draw a border inside the edges of the layer that it's applied to. This works great for Solid layers. However, when I apply the effect to a text or shape layer, my effect draws a border around the entire composition. The PF_EffectWorld passed into my render function has the same dimensions as the entire composition.
How can I determine the bounds of the text or shape layer that the effect is applied to? I basically want to draw a rectangle that has the same bounds as the selection box drawn by AE. I attached a photo that shows what I'd like to do.
collapsed layers don't have a size and are actaully the same size as the comp. text and shape layers are such layers by default.
you can scan the input buffer for non 0 alpha pixels and get the image's bounding box.
but i think you'll get the input buffer post-transform (again, collapsed layers), so you'll need to manually take the layer's tansform into account if you wish the frame to follow layer transformation. that, however, is counter to the AE logix as effects on colapsed layers are generally expected to apply in comp coordinates and not layer coordinates.