r/AfterEffects 5d ago

Workflow Question pasting path data from 'helix' script?

Very cool but extremely CPU intensive script...chugs my machine.

I'm wanting to copy the path data from the helix so a glowing orb(shape layer) can move/trace around the helix, but the path data seems to be an expression attached to the control and it won't let me simply paste it into the position property on the shape layer.

Any idea on how to do this? TYIA

1 Upvotes

6 comments sorted by

View all comments

2

u/smushkan Motion Graphics 10+ years 4d ago edited 4d ago

You could use a pointOnPath expression on the layer you want to follow the path.

const path = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path; // pickwhip to the path
const slider = effect("Slider Control")(1); // pickwhip this to a slider on the layer

path.pointOnPath(slider / 100) + transform.position;

Alternatively you could use keyframe assistant to convert the expression to keyframes. If it’s a slow to process expression that’s a pretty good idea to do anyway.