Link mask path form nested composition

I link mask Path from nested composition. And the new mask becomes larger than the parent one. How I fix the size mask without scaling layer?

I link mask Path from nested composition. And the new mask becomes larger than the parent one. How I fix the size mask without scaling layer?
So I ran a little test that seems to work well. You set L1 to the layer in the precomp with the mask you want to copy and you set L2 to the precomp layer in the main comp. In the main comp you would create a shape layer by clicking anywhere with the pen tool and paste this in for the shape path:
L1 = comp("zipper 1").layer("zipper 1.avi");
L2 = thisComp.layer("zipper 1");
path = L1.mask("Mask 1").maskPath;
p = path.points();
it = path.inTangents();
ot = path.outTangents();
pNew = [];
itNew = [];
otNew = [];
for ( i = 0; i < p.length; i++){
pNew[i] = fromComp(L2.toComp(L1.toComp(p[i])));
if (it.length > 0){
temp = fromComp(L2.toComp(L1.toComp(p[i] + it[i])));
itNew[i] = temp - pNew[i];
}
if (ot.length > 0){
temp = fromComp(L2.toComp(L1.toComp(p[i] + ot[i])));
otNew[i] = temp - pNew[i];
}
}
createPath(pNew,itNew,otNew,path.isClosed())
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.