Converting layer coordinates to composition coordinates
Does anyone have effect plugin code for converting a coordinate in a layer to a coordinate in the composition? I'm basically trying to determine the bounds of a layer at a given time, and express that in coordinates of the composition.
For example, suppose the user creates an adjustment layer. Then they resize and move the adjustment layer, and apply my effect to it. I'm trying to determine where the 4 corners of the adjustment layer are within the composition.
I have a feeling the solution will involve calling AEGP_GetLayerToWorldXform(), figuring out the untransformed bounds of the layer, and then transforming them into composition coordinates. However, I'd rather not reinvent the wheel. Has anyone done this before?
Thanks for your help.