-
toWorld – different resolution layer for corner pin
I have a layer with a different resolution and aspect ration than the comp and I need to corner pin the layer to the layer below it using an expression.
The comp is 1280×720 but the layer I need corner pinned is 2200×3797
The layer I want to corner pin has been scaled from a few different parents so I want to capture the location of it using “toWorld”.
The problem is I don’t know what to do with those numbers because the corner pin works on the layer’s resolution.
So for the left corner I have a Null in the position I want. If I corner pin a solid then the expression works:
c = layer;
c.toWorld(layer’s anchor);What I can’t seem to wrap my head around is how to convert the comp space numbers back to layer space so the corner pin will work.
I gave an attempt at it, but can’t make sense of any of the numbers that are coming back.