Get data about layer boundaries (text, shape, etc.) in expressions?
Hello, I have a question. Is it possible to get layer boundary data in expressions?
I watched a video on YouTube:
https://youtu.be/BIwppXzHErY?list=PL79TBmLa4lTRo4RgRmWkcPkwHA6HNGwZz&t=178
And I did the same, but I would like to use a text layer, for example, and have a method that measures the length between the points "length(pos1,pos2);" worked differently, that is, to obtain data between the length of the position point of one layer and the border (for example, the border of a text block or the border of a shape) of another layer. For example I'm typing text and its bounding box seemed to be "pushing out" the squares in size around the frame/border of the text rather than its position point. I know that you can create a similar effect as in the video using “sampleimage” and blur the edges to achieve a smooth transition, but I was interested in another method.
Expression from the video:
var p1 = thisLayer. transform. position;
var p2 = thisComp.layer("Null 1").transform.position;
var ScaleFrom = thisComp.layer("Adjustment Layer 1").effect("Scale From")("Slider");
var ScaleTo = thisComp.layer("Adjustment Layer 1").effect("Scale To")("Slider");
var Hitin = thisComp.layer("Adjustment Layer 1").effect("hitbox Inside")("Slider");
var HitOut = thisComp.layer("Adjustment Layer 1").effect("hitbox Outside")("Slider");
var d = length(p1, p2);
var r = linear(d, HitOut, Hitin, ScaleFrom, ScaleTo);
[r,r]
Sorry if I didn’t write it clearly, I translated my thoughts from Google translator🙏
