加载中…
个人资料
迪拍摄影
迪拍摄影
  • 博客等级:
  • 博客积分:0
  • 博客访问:36,365
  • 关注人气:118
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
博文
标签:

ae

sourcerectattime

分类: AE
(1)形状图层与文字层子父链接AE--文本框跟随文字变大变小而变化


(2)形状图层---Rectangle Path---size

margin=70;
text_width=thisComp.layer("文本").sourceRectAtTime().width;
text_height=thisComp.layer("文本").sourceRectAtTime().height;
box_width=text_width+margin*2;
box_height=text_height+margin*2;
[box_width,box_height]
AE--文本框跟随文字变大变小而变化

(3)形状图层---Transform:Rectangle---position

t=thisComp.layer("文本");
tRect=t.sourceRectAtTime(time,false);
tUL=t.toComp([tRect.left,tRect.top]);
tLR=t.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);
tCenter=(tUL+tLR)/2
myRect=sourceRectAtTime(time,false);
myUL=toComp([myRect.left,myRect.top]);
myLR=toComp([myRect.left+myRect.width,myRect.top+myRect.height]);
myCenter=(myUL+myLR)/2
delta=myCenter-tCenter;
value-delta
AE--文本框跟随文字变大变小而变化




最终效果:
AE--文本框跟随文字变大变小而变化

AE--文本框跟随文字变大变小而变化




阅读    收藏 
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有