Expression to calculate the sum of the lengths of trim paths
Copy link to clipboard
Copied
On a shape layer I have a group that contains a stroked path with a trim path operator. I'd like to fill the whole path with stroke segments of different color and length by duplicating the group. The color part is working but I am getting confused how to calculate the starting and end points for each segment. Offset will be used to drive the animation.
For the Start value this works fine (it sums the values of End):
Probably simple but I just seem to be stuck with this. Any help is much appreciated.
Copy link to clipboard
Copied
I see no provision to actually check whether the values are legally between 0 and 100, which could already be the issue.
Mylenium
Copy link to clipboard
Copied
I think I figured it out. The code was waaay off. Probably should implement Mylenium's suggestion but here's the code:
For the Start value:

