[익스프레션3] sourceRectAtTime (텍스트에 Bar크기 맞추기)

텍스트의 크기에 따라 바의 크기가 자동으로 변형된다.

사각형의 Size에 본 값을 대입하고

m = thisComp.layer("ADIDOF").sourceRectAtTime(0).width;  //콤프 레이어에 "(해당텍스트레이어)"
b = thisComp.layer("ADIDOF").sourceRectAtTime(1).height;  
[m+20, b+20]


사각형의 Position 값에 아래 값을 대입한다.

a = thisComp.layer("ADIDOF").sourceRectAtTime(0).width/2;
b = thisComp.layer("ADIDOF").sourceRectAtTime(1).height/2;
c = thisComp.layer("ADIDOF").sourceRectAtTime(1).top;
d = thisComp.layer("ADIDOF").sourceRectAtTime(1).left;
[a+d, b+c]  // [가로길이+좌측, 높이+상단]



+ Recent posts