Copy link to clipboard
Copied
I need an expression that allows the "shape" layer to be placed in the center left of the "Shape layer 1".
What's wrong with my code?
rect = comp("Pre-comp 1").layer("Shape Layer 1").sourceRectAtTime();
[rect.left, rect.top + rect.height/2]
Try it this way:
L1 = comp("Pre-comp 1").layer("Shape Layer 1");
rect = L1.sourceRectAtTime();
p = L1.toComp([rect.left, rect.top + rect.height/2]);
L2 = thisComp.layer("Pre-comp 1");
L2.toComp(p)
Copy link to clipboard
Copied
Try it this way:
L1 = comp("Pre-comp 1").layer("Shape Layer 1");
rect = L1.sourceRectAtTime();
p = L1.toComp([rect.left, rect.top + rect.height/2]);
L2 = thisComp.layer("Pre-comp 1");
L2.toComp(p)