Thanks for your reply Roland.
I wasn’t sure how difficult it was to achieve this so it’s good to know that it is a complicated one (so I’m not too hopeless)!
I’m happy to dig deep as this won’t be a one off project for me and I’ll need to be able to make .mogrt templates out of motion graphics I designed. I’ve been hating to compromise my design due to lack of knowledge/skill of writing expressions to convert them into .mogrt…
Anyways, here are the codes. Please let me know what you think. I’m not looking into Linear Interpolation Expression Method that you suggested. Thanks again.
Rectangle Path – Size
var s = thisComp.layer(“text here:)”);
var start = s.inPoint;
var end = s.outPoint;
var mid = (end-start)/2;
var w = s.sourceRectAtTime(mid).width;
var h = s.sourceRectAtTime(mid).height;
[w,h];
Rectangle Path – Position
var s = thisComp.layer(“text here:)”);
var start = s.inPoint;
var end = s.outPoint;
var mid = (end-start)/2;
var w = s.sourceRectAtTime(mid).width/2;
var h = s.sourceRectAtTime(mid).height/2;
var t = s.sourceRectAtTime(mid).top;
var l = s.sourceRectAtTime(mid).left;
[w+l,h+t];
Transform: Rectangle 1 – Anchor Point
var s = thisComp.layer(“text here:)”);
var start = s.inPoint;
var end = s.outPoint;
var mid = (end-start)/2;
var t = s.sourceRectAtTime(mid).top;
var l = s.sourceRectAtTime(mid).left;
var o = content(“Offset Paths 1”).amount;
[l-o, t-o]
Transform: Rectangle 1 – Position
content(“Rectangle 1”).transform.anchorPoint