ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

new toWorld with controlling line points

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andy Engelkemier
new toWorld with controlling line points
on Dec 4, 2019 at 4:51:28 pm

This is Super frustrating, because if you search for expressions controlling individual points on a line, you'll find a Bunch of responses of....."you can't do that." But that's not right anymore!!!

Also I always have to find a post by Dan Ebbert every time I want to remember how to do a toWorld script. Only.....that doesn't work anymore. They changed the language, so it just throws an error.

SO, I figured I'd share this. Add this script to a shape layer (note, make the shape layer position 0,0. the default is the center of your composition)

L = comp("Comp 1").layer("point01")
P1 = L.toWorld(L.anchorPoint)

L2 = comp("Comp 1").layer("point02")
P2 = L2.toWorld(L2.anchorPoint)

createPath(points = [P1, P2])

You'll need a layer named point01, and another as point02. The script will draw a straight line between those two points.

Some might ask, Why would you do that? Well, for one, it renders faster than using an effect. Also, you can do things like add noise, trim the paths a bit so they don't actually connect to the object, make it dashed, add wiggle without losing quality, etc.

So that's it. I just thought I'd share since I keep being frustrated that I can't find an updated version of the script. I can't remember syntax for the Life of me, which is why I'll never be a good programmer. But a little bit is kind of necessary to do what you want in AE.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved