Highlighted

Border of Shape Resize depend on text scale

New Here ,
Apr 30, 2020

Copy link to clipboard

Copied

In the picture I include, I want to autoscale trim path border depend on text scale like this pic

What is the expression should we do for this? PPic.PNG

TOPICS
Expressions, Resources, Scripting

Views

230

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Border of Shape Resize depend on text scale

New Here ,
Apr 30, 2020

Copy link to clipboard

Copied

In the picture I include, I want to autoscale trim path border depend on text scale like this pic

What is the expression should we do for this? PPic.PNG

TOPICS
Expressions, Resources, Scripting

Views

231

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 30, 2020 0
Most Valuable Participant ,
Apr 30, 2020

Copy link to clipboard

Copied

Could be as easy as adding up the four sides of the rectangle and then subtracting the gap and then filtering it through a linear() expression to get the percentages for the Trim Paths operator. Something like this perhaps:

 

mGap=thisComp.layer("Image").width; //image width
mPad=20; //extra padding for image
mRect=content("Rectangle").content("Rectangle Path").size;
mRectLength=(mRect[0]+mRect[1])*2;
mGapLength=mRectLength-mGap-mPad*2;

linear(mGapLength,0,mRectLength,0,100);

 

Where the actual gap appears can easily be controlled with the trim path's offset setting, which in your case would be 50% or something like that...

 

Mylenium

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 30, 2020 1
New Here ,
May 03, 2020

Copy link to clipboard

Copied

Thank you! I will try your method 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 03, 2020 0