Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //paste to position
- gw = function(ind){
- res = 0;
- for( j = ind; j >= 1; j--){
- if((thisComp.layer(j).rotation.value/90)%2 == 0)
- res += thisComp.layer(j).sourceRectAtTime(time).width*thisComp.layer(j).scale[0]/100;
- else
- res += thisComp.layer(j).sourceRectAtTime(time).height*thisComp.layer(j).scale[1]/100;
- }
- return res
- }
- i = index-1;
- if(!i){
- if((rotation.value/90)%2 != 0){
- [height, width]/2
- }else{
- [width, height]/2
- }
- }else{
- x = gw(i) + width/2;
- y = height/2;
- if((rotation.value/90)%2 != 0){
- x = gw(i) + height/2;
- y = width/2;
- }
- [x, y]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement