ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Using source text to scale a path

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Darren Case
Using source text to scale a path
on Jan 6, 2020 at 4:41:40 pm

I'm needing to create a bar graph that's connected to a JSON file via Templater.

I wont be using the mamoworld.json plug-in, since this project needs to be custom, but I've been following their tutorials.

Thinking I can make the bars using a path with a thick stroke. Then use the "create nulls from path" action. Then somehow link the nulls position to the source text of the percentage. The percentage will be linked to the JSON file.

The source text needs to drive the bars height.

I'm not sure if that'll work or how to even accomplish this. Thanks so much for your help!


Return to posts index

Andrei Popa
Re: Using source text to scale a path
on Jan 6, 2020 at 6:17:05 pm

I think the best way is create a rectangle with no stroke. The height of this rectangle should be the 100% value. Then link it's height to the source text of the percentage. Something like this, inside the size property. Modify Percentage Layer to what you have in project.

L = parseInt(thisComp.layer("Percentage Layer").text.sourceText);
[value[0], value[1]*L]


Andrei
My Envato portfolio.


Return to posts index

Darren Case
Re: Using source text to scale a path
on Jan 6, 2020 at 6:42:29 pm

Awesome, thank you so much. It worked!

I had to use... value[1]=L
instead of value[1]*L

*L made the bar go up to 10,000%.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]