Hi Guys I am trying to put this expression on my text layer scale property and i’m getting this error:
error at line 5 property ‘scale’ of layer (text) in comp 1.
property or method named rectangle path 1 in class ‘group’ is missing?
any ideas where I am going wrong?
Thanks,Ricky.
// grab sourceRect based on layer time
R = sourceRectAtTime(sourceTime(time), true);
// calculate scale relative to comp
w = thisComp.layer("Shape Layer 1").content("Rectangle Path 1").size[0] / R.width * 100;
h = thisComp.layer("Shape Layer 1").content("Rectangle Path 1").size[1] / R.height * 100;
s = Math.min ( w, h );
[ s, s ]