Copy link to clipboard
Copied
In the Effect Controls of my path text, there's an "Information" category with the following data:
Font: | Arial |
Text Length: | 3520.69 |
Path Length: | 640.08 |
The "Path Length" value is exactly what i want to use in an expression, but i don't know how to access it. I've tried a dozen different ways to approximately re-calculate it without satisfactory results. Is there any way to access this value within an expression?
For context: i have individual image layers in my composition that i have visually "connected" using another path text layer, pickwhipping the vertices of the path text to each of those graphics' positions. The tangent points are also calculated based on the same positions. The "string" connecting them is a bunch of ellipsis typed along that path. Both of the graphics move around the screen. i want to be able to adjust them both without having to manually adjust the path text too. The problem i have is trimming the path text dynamically depending on how short the distance between the two is, because the Path Length changes constantly. in all my attempts to calculate, the path text either gets too short or long when the graphics move around. if i could use the Path Length value, i could put it in a linear formula for Visible Characters to trim off the excess. and i have a bunch of these happening at once, so i could really use a formulaic solution.
I'm hoping this is simple, it seems like it would be since the value is right there?
Expressions, with only a couple of exceptions, can only access things you can animate. If you choose Line path length is determined by the vector distance between Vertex 1 and Vertex 2 so some simple vector math would give you the length. If you choose Bezier then the formula becomes much more difficult because the Path Length depends on the relative position of all four points. It's probably doable but extremely complex.
Path text is a very old plug-in. It's in the obsolete category.
If I underst
...Copy link to clipboard
Copied
Expressions, with only a couple of exceptions, can only access things you can animate. If you choose Line path length is determined by the vector distance between Vertex 1 and Vertex 2 so some simple vector math would give you the length. If you choose Bezier then the formula becomes much more difficult because the Path Length depends on the relative position of all four points. It's probably doable but extremely complex.
Path text is a very old plug-in. It's in the obsolete category.
If I understand the project a better, easier option, would be to simply draw your paths on a text layer, align the text to the path, then use the new Create Nulls from Path script to tie nulls to the paths. You have the option of Nulls Follow Points, Points Follow Nulls or Trace. If all you want is dots between the images you could create a stroked path, set the stroke to rounded ends, add dashes and spaces, tie nulls to 2 bezier points on a shape layer path, then just drag the nulls around to move the images and set up the dotted lines between them. It would be way more efficient and take far less time than fiddling with expressions.
In this example I used points follow nulls the replaced the nulls with two Images (nested comps) adjusted the anchor points and animated the move. Took about 2 minutes to setup:
You can see every modified property on the layers in the comp.
Copy link to clipboard
Copied
apologies for the delays, i'm just now getting time to return to this project.
first, thanks so much! the detailed explanations and especially the screenshots help me immensely.
i've never done anything with scripts before, so i'm trying to learn on the fly. i don't have the "Create Nulls from Path" script available. it should apparently be there by default in CC 2018, but i have the latest version of after effects installed and it isn't there, so i'm already lost:
it doesn't exist in the normal ProgramData subfolder either. i've searched the adobe site for "Create Nulls from Path.jsx" without success. is there a reputable place i can add this from?
i'll try reinstalling to see if that helps in the meantime.
Copy link to clipboard
Copied
of course i find the script right after posting that. it's in the ScriptUI Panels subfolder. nevermind my previous message, i'll keep going from there.
Copy link to clipboard
Copied
I'm hoping this is simple, it seems like it would be since the value is right there?
Nope. Regardless of what method you use, you have to implement your own Bèzier formula to calculate the values. This stuff isn't exposed anywhere. The only exception would be BAO's Masked Avenger plug-in, though there are still limitations in that. If you realyl create only a bunch of dotted lines, relying on the automated functions of shape layer strokes or similar seems an easier way to achieve that.
Mylenium
Copy link to clipboard
Copied
The solution lies in downloading Long Path Tool.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now